Ape Issue 3516 for Calibration Control Version 9.5
When printing Calibration Certificates to a PDF file, Calibration Control uses the Calibration Certificate PDF Mask located in the Number Mask Options dialog.
Currently, this mask feature allows the four variables for:
1. Certificate
2. EquipmentID (Equipment ID)
3. PrintDate (Print Date), and
4. CalDate (Calibration Date)
Additionally, the CalDate can be broken up into its constituent parts for further formatting:
1. CalYear (Calibration Year)
2. CalMonth (Calibration Month), and
3. CalDay (Calibration Day)
The default Mask (visible in the Number Mask Options dialog) includes the Certificate, Equipment ID, and Print Date. Let’s print an initial PDF certificate to see how this default mask performs.
Note that the variables are replaced with their values of the Certificate Number, Equipment ID, and today as the Print Date.
In this new feature, any of the fields that can be included in a SQL SELECT statement can also be added to the list of usable variables for the PDF mask. Besides those listed above, the fields currently available in the default SQL SELECT statement are:
1. AlternateId (Alternate ID)
2. SerialNumber (Serial Number)
3. ModelDesc (Equipment Description)
4. CDate (Calibration Date)
5. IdNumber (Site ID Number), and
6. CompanyName (Site Company Name)
Additional fields can be made available to the mask by modifying the SQL SELECT statement and then using the name of the new field as the variable within the mask.
Back in the Number Mask Options, let’s change the PrintDate variable to the Equipment Description field and then create a new PDF certificate.
Note the Description of CMM is now visible in the PDF file name.
Let’s take this one step further and use a field that is not within the fields of the default SELECT statement.
A specific SQL SELECT statement is used to pull the values of the variables used by this mask. The more fields within the SQL statement, the more variables available to the PDF file mask. If you know how to modify a SQL statement, then you can do so within the Grid SQL table of your database. The name of this statement within the Grid SQL table is ‘PDF Certificate Fields’. You can modify this statement with the following generic steps:
1. Use a SELECT statement to display the specific record containing the statement you need to edit. In this case, I’m using the SqlGuid field for the WHERE clause, but you could also use the SqlName field.
2. Copy the value from the SqlString field to your Query editor so you can make changes. I like to execute the statement to get a better feel for the data.
3. Modify the statement to add the desired fields. In this case, I’m adding all the custom Character fields from the Equipment record. And again, execute the statement to ensure it’s returning the data you need.
4. Finally, use an UPDATE statement with the same WHERE clause as the first step to update the SqlString with your edited value.
If you need help modifying any of your SQL statements, just contact us at Ape Software and we’ll help you modify your SQL statement.
Now that I’ve added some new fields, let’s test one to ensure they work.
In this test, I’m changing the last variable to Character0
You can also see that I’ve already added a value for Character 0 in our test record, so let’s print the PDF certificate again.
Note this time that the Character0 value was successfully replaced with the value for that field.
In summary, this new feature gives you the ability to add as many variables as you like for your PDF Certificate files.
Have fun!!
Calibration Control Version History
https://www.apesoftware.com/calibrati...
Download Calibration Control
https://www.apesoftware.com/calibrati...
All Calibration Control Help Topics
https://www.apesoftware.com/calibrati...