Barcode Tools for Crystal Reports > Picture barcodes in CR XI

Creating the formula

While every requirement will need a different formula there are some general points that should be taken into account when creating the formula to generate the barcode symbols. Every formula will need to specify a CodeType and  we recommend the use of the Xunit parameter to specify the basic element width for the symbol, so every symbol will start with code of the form:

"http://localhost/dlbc/dlbc.aspx?CodeType=9&Xunit=16

The size of the barcode may be specified in units of your choice (the default is millimeters) and the height of the barcode is specified using the ImageHeight property, so code of the form

&ImageHeight=16

Is needed

(the ImageWidth parameter may be used as an alternative to specifying the Xunit value. Xunit values are provided in Mils – 1/1000 inches, while ImageHeight and ImageWidth may be in units of your choice. Note that either Xunit or ImageWidth must be specified.)

For barcodes that will include human readable text under the bars the font used to create such text may be specified using the FontName and FontSize properties – otherwise the default of 10 pt Arial will be used.

Many other optional parameters are available and are listed in the Reference section.

Finally every formula needs to end with code that specifies the Data, using code of the form &Data=12345 or, much more likely, &Data= followed by the source of the data, for example

http://localhost/dlbc/dlbc.aspx?CodeType=9&Xunit=12&ImageHeight=16& Data=+{fieldname}

for a Code 128 symbol with an Xunit value of 12 Mils, a bar height of 16 mm, and the data taken from a field name fieldname.

 

 

More:

Font barcodes