The Report Designer tool supports several types of barcodes. They are all created in the same way, by a right mouse button click on the item that you want to convert to a barcode. The barcode type is then assigned by the property Code Type. Report Designer can create 1D Barcode and 2D Barcodes.
This subsection describes the standard properties of a barcode. Let us look at how some of these properties behave when applied with different values. Following is a listing of all the available barcode properties.
|Code Type||Specifies a specific type of barcode.|
|Bar height||Specifies the height of the barcode in cm.|
|Narrow bar width||Specifies the width of the narrow bars in cm.|
|Wide bar width||Specifies the width of the wide bars. This is calculated by multiplying the Narrow bar width.|
|Left Margin||The margin between the barcode and the left margin of the cell/block container in cm.|
|Top Margin||The margin between the barcode and the top margin of the cell/block container in cm.|
|Rotate||The degree in which to rotate the barcode. The rotation is performed in a anti clockwise manner.|
|Bar color||Barcode color.|
|Background color||Background color of the barcode.|
|Font color||Font color of the text specified under the barcode.|
|Text on top||Determines whether the text is to be printed on top (checked) or the bottom (unchecked) of the barcode. By default this is set to bottom|
|Hide Text||Determines whether to hide (checked) or display (unchecked) the barcode text.|
|Intercharacter separator||Is only specific for certain barcode types. This specifies the distance between two bars. This too is calculated by multiplying the Narrow bar width.|
In addition to those listed above there are other barcode specific properties, which you may need to specify according to your requirements.
Report Designer tool uses a third party tool to generate barcodes. The builtin support is there to help customers to include a barcode in to their layout with ease. Yet, there can be limitations in this third party barcode generation tool. You can use one of the following alternatives in such a case.
1. Script Plug-in¶
You can use the Report Plugin of type Script Plugin and emit the barcode layout directly to a barcode printer such a Zebra barcode printer. This script can contain PCL scripts such as ZPL, EPL etc. This is actually the preferred solution for industrial label printers. Have a look at the Script Plugin for more information.
2. Barcode Font¶
You can use a barcode font to generate the barcode. This involves a few development steps.
- First you will have to encode the report xml data in the XML to a barcode specific data. The modification should be done in the report RDF before the data value is written in to the XML tag. For complex barcode types (e.g. Code 128) you might have to use a third party tool to convert the report data to a barcode specific data. After converting, you can add the encoded data value as the data item in the XML tag for that report object instead of the original report data. For example, if the original report data is ABC123, the encoded barcode specific data value for Code 3 of 9 barcode type is *ABC123* and this is the value you should write in to the generated XML.
NOTE: As the barcode generation logic needs to be custom added, it's the developer's responsibility to test and verify if barcode encryption is working as expected and a valid value is generated. The R&D will not provide any support in barcode generation logic.
Through the Report Designer tool, change the layout field object to use the specific barcode font. Here in order for the font to be enabled in the tool, you will have to install the barcode font in the machine where you are running the Report Designer tool and add the font in to the tool.
Import the barcode font to the database so that it could be used by the layout at runtime to generate the PDF.
Have a look at Fonts for more information on how to add fonts to the Report Designer tool and database.