Printed Labels |
Previous Top Next |
Configuration > Printed Labels CISPro Global prints labels for a variety of uses: barcode identity labels for containers, hazard labels for containers, sample and retain labels. To provide flexibility, the system can be configured to provide the user with a list of labels to choose from for any of these purposes. In addition, different Workunits can be configured to use different sets of labels. Labels consist of two required parts: a SQL Query, and a Printer Template. More information on constructing these parts will be provided at the end of this topic. Assuming that the SQL Query and Printer Template are already available, here is how to configure a Printed Label in CISPro Global: To Configure a Printed Label
Creating a new Printed Label
Editing an existing Printed Label
Deleting a Printed Label
Configuring Work Unit Label Access In some cases certain labels may differ by Work Unit. CISPro Global makes this easy by requiring that each label be configured for Work Units. Only Work Units which have been granted access to a label will be able to use it. Therefore, it is possible to have a large menu of label choices, but only a few are used by each Work Unit. To Configure Work Unit Label Access
To Remove Work Unit access to a Label
Users can choose from several pre-configured or custom labels. The Used For indicates which labels to use when a particular operation is performed by the user. Here is a list of the label types and what field value is provided for the query when using each type:
Label Types (Asterisk* = Material Qualification Module only) Constructing SQL Queries Each Label Type (Used For) requires a certain filtering value. When the user prints a label for an operation, the system will select the appropriate Used For label and provide the current filter value to query for that label. Example: If the user reprints a label for a container, then the query will be provided with the containers.containerid value for the container the user is viewing. In that case, the query should look something like this: select * from containers where containerid={containerid}
The key to SQL Queries for labels is in making sure that the query contains the appropriate field name within curly braces: {containerid}. If the user were trying to print a User Label, then the query would look something like this: select * from users where userid={userid}
It doesn't matter how complex the query is as long as the appropriate field name within curly braces is provided as part of the WHERE clause. Using Printer Templates CISPro Global can support any label printer as long as the printer has a way to accept text commands to describe a label. ChemSW has successfully used printers from Eltron, Zebra and Intermec for printing labels because each of these brands provides a "printer language" that is based on text commands. Here is how it works: When the user prints a label, CISPro Global runs the query for that label, and then replaces the "tags" in the Printer Template with the results from the query. So if a tag matches a field name in the query, the data goes into the tag space in the template. If there is no matching field, then the tag is replaced with blank text. There are also some "special functions" which can be used as tags to provide advanced printing capabilities. This includes printing certain types of graphics on the label. These are installation specific; please contact the system administrator or ChemSW technical support to find out more about this feature. Example: Here is an example of a label query and printer template using EPL2 (Eltron Printer Language) for sample labels: QUERY (note materialid is in the select clause) SELECT c.containerid, c.barcodeid, m.materialname, pi.pictocode, pi.graphicfilename, m.materialid from containers c, packdetail pd, packages p, materials m LEFT OUTER JOIN jct_pictograms_materials j ON (m.materialid = j.materialid and j.deleted = '0') LEFT OUTER JOIN pictograms pi ON (j.pictogramid = pi.pictogramid) where (m.materialid = p.materialid) and (p.packageid = pd.packageid) and (pd.packdetailid = c.packdetailid) and c.containerid = {containerid} order by (pi.priority) asc
EPL (printer data for Eltron label printer. Note the _n suffixes for text wrapping) I8,1,001 q664 S2 OD JF WN D7 ZB Q375,37 N A41,5,0,2,1,1,N,"{materialname}" A41,30,0,2,1,1,N,"{materialname_2}" B41,60,0,3,3,8,70,N,"{barcodeid}" A41,135,0,2,1,1,N,"{barcodeid}" A41,170,0,2,1,1,N,"{custom:rcodes}" A50,195,0,2,1,1,N,"{custom:rcodes_2}" A41,225,0,2,1,1,N,"{custom:scodes}" A50,250,0,2,1,1,N,"{custom:scodes_2}" A41,280,0,2,1,1,N,"{custom:hazcodes}" A50,305,0,2,1,1,N,"{custom:hazcodes_2}" A41,335,0,2,1,1,N,"{custom:freetext}" P1
For details on the printer template commands, consult the Eltron EPL2 documentation, but suffice it to say that the query and printer template shown here define a label that includes material name and a material synonym on the first row, container barcodeid as a barcode and then human-readable text on the second line, then 2 risk codes, 2 safety codes, 2 hazard codes, and a freetext field. Using Params Label Printers do not understand the concept of wrapping text fields. So if a label layout has a field that is 20 characters long on the stock, but the data provides it with 35 characters, one of two things happens: either the words print right off the margin of the label, or the printer tries to correct it by shifting it to the left and running over other elements on the page (and then runs off the opposite margin anyway). Fortunately, CISPro Global understands this and provides a mechanism for dealing with it. Each label configuration can have a list of "params." These are actually descriptions of how long a field can be, and it provides a text-wrapping feature. Each "param" in the list is composed of an alphabetic or symbol command, followed by a list of numbers and other specifications, separated by commas, that lay out the specifics. Here is how it works: An Example of Param Use Suppose there is a user label that uses the following query: select namefirst,userid from users where userid={userid}
And assume that there is a line to print the namelast field in the Printer Template: A41,225,0,3,1,1,N,"{namelast}"
In this case, the "A" command is being used to print an ASCII text string. The number 41 is the horizontal start position, 225 is the vertical start position, 0 is the rotation, 3 is the font size selection, etc. Finally, the word to be printed is the value of the variable "namelast." The problem is that namelast can be up to 40 characters, but the space on the label only allows about 12. However, there is space to print another 12 characters for 2 more rows below the first one. This is where Params come in. First, the template needs to be changed so the system knows where to find additional space: A41,225,0,3,1,1,N,"{namelast}" A41,250,0,3,1,1,N,"{namelast_2}" A41,275,0,3,1,1,N,"{namelast_3}"
Notice the namelast_2 and namelast_3 fields. They are extension fields, and they accept the overflow from the primary field. Also notice that there are no namelast_2 or namelast_3 columns in the query. This is critical! Next, the Params list must be configured. This is as simple as listing the primary field name and how long each line can be: namelast=12
Now, when CISPro Global goes to print this label with the namelast of "Someverylonglastnameski", it will actually send this to the printer: A41,225,0,3,1,1,N,"Someverylong" A41,255,0,3,1,1,N,"lastnameski" A41,275,0,3,1,1,N,""
What happens if the name is longer than (3 x 12 = 36) characters? The extra characters will be excluded from the printed label. Special Rendering Functions CISPro Global provides a set for reserved tags which can be incorporated into the printer template to generate text which cannot be easily provided through a simple SQL query. Example: The user may want to render a comma delimited list of Risk Phrase Codes on the label. The EPL template line to do this would be: A41,210,0,3,1,1,N,"{custom:rcodes}"
Similarly for Safety Codes it would look like this: A41,210,0,3,1,1,N,"{custom:scodes}"
Or to list the phrases (including hazard categories): A41,210,0,3,1,1,N,"{custom:rphrases}" A41,230,0,3,1,1,N,"{custom:sphrases}" A41,250,0,3,1,1,N,"{custom:hazcodes}"
To put each phrase on a separate line, the user must provide as many lines as needed, because the system will only render as many lines as the template provides. In the next example, up to three risk codes & phrases are listed on separate lines: A41,210,0,3,1,1,N,"{custom:rloop1}" A41,230,0,3,1,1,N,"{custom:rloop2}" A41,250,0,3,1,1,N,"{custom:rloop3}"
Graphics The user may also want to include graphics on a printed label. A good example is pictograms, the internationally recognized safety symbols that can be added to the Hazards tab of a chemical. The GG command is used to print a PCX format graphic that has previously been stored in printer memory. It is even possible to print several pictograms in one row, to conserve space on the label. The following example uses the GG command with the graphic name 'loopg', the name CISPro Global used when the pictogram graphics were stored (and the name recognized by the Eltron printer). There are three pictos for this label, to be printed on the same line: GG41,280,"{loopg:filename}" GG250,280,"{loopg:filename}" GG450,280,"{loopg:filename}"
Custom Tags CISPro Global supports the following custom tags: custom:rcodes - prints risk codes (beginning with R) as comma delimited list custom:scodes - prints safety codes (beginning with S) as comma delimited list custom:hazcodes - prints hazard categories (not beginning with R or S) as comma delimited list custom:rphrases - prints the english text risk phrases, separated by comma custom:sphrases - prints the english text safety phrases, separated by comma custom:freetext - if there is a free text prompt, that content goes here custom:rloop - must have an integer suffix 1-99, prints that index of the list of risk phrases custom:sloop - must have an integer suffix 1-99, prints that index of the list of safety phrases custom:hloop - must have an integer suffix 1-99, prints that index of the list of hazard categories Prompts Printed labels can be configured to prompt the user for input before printing. This can be achieved by adding prompt tags to the EPL template. The template can contain as many as 20 prompts. Add User Prompts to a Label
User prompt example The following prompt lines will appear as 2 text entry boxes on the label when, on the Print Label page, a user selects the label whose EPL contains them: A41,165,0,3,1,1,N,"{prompt:Requested By}" A41,190,0,3,1,1,N,"{prompt:Reason}"
Bringing it all together In order to make a printed label work, the following conditions must be met:
In addition, the user must be connected to the correct type of printer, and the user's local web browser must be able to print to that printer using a Generic Text Driver. Assuming all of these conditions are met, CISPro Global will print custom labels for specific purposes. Custom Codes and Required Select Fields Here is a table that contains each custom code, as well as the select field that must be included in the query on any label that uses it.
Required Select Fields for Custom Codes (* = Material Qualification Module Only)
|