Printing barcodes
All Salesware components use the Code39 or Code128 barcode font. These fonts are installed as part of the Common Files installation (see the Salesware Installation Guide for more information). Therefore, when designing tickets that contain a barcode you must print the barcode using either the Code39 or Code128 barcode font. The 128 barcode font encrypts the data, thereby reducing the size of the printed barcode and making the barcode more readable for larger numbers.
The following line of code prints a Code39 barcode rotated 90 degrees on a Cognitive:
BR code39(2:6)- 705 640 100 <|if(empty(tmp_edate),'*AXX','*A'+
encrypt_date(tmp_edate)) +encrypt_number(tmp_access)+alltrim("*")|>
The following code prints a Code39 barcode with no rotation on a Cognitive:
B Code39(2:6)- 235 400 95
<<|if(empty(tmp_edate),'*AXX','*A'+encrypt_date(tmp_edate))+encrypt_number(tmp_access)+alltrim("*")|>
The following line of code prints a non-rotated Code128 barcode on a Cognitive:
B code128(2:4) 350 500 70 <| if(empty(tmp_edate),'*AXX','*A'+
encrypt_date(tmp_edate)) +encrypt_number(tmp_access)+alltrim("*")|>
Because the above barcode commands do not print subtext, it is necessary to print the following subtext line to indicate what characters are contained in the barcode:
U B25 (2,1,90) 675 750 <|'A'+alltrim(str(tmp_access,20,0))|>
Note: The 90 in the (2,1,90) is signifying 90 degrees of rotation. For the non-rotation barcodes, this value must be set to 0.