Font barcodes may be incorporated into any version of Crystal Reports using the barcode fonts supplied with 2D Barcode Tools for Crystal Reports and the accompanying UFL (User defined function library) U25CRDF.DLL. The fonts are AZTxx, (for Aztec, Datamatrix and QR Code symbols), and PD2xx, PD3xx, PD4xx and PD5xx (for PDF 417 and Micro PDF417), where the xx refers to the font weight and the number (2 – 5) refers to the height/width ratio of the individual elements. W fonts produce the full bar and space sizes and these fonts are installed by the setup program, while the R and N fonts produce bars in which the bar width has been reduced by 8 and 16% respectively. These reduced width fonts are not installed but may be found in the fonts folder in the 2D Barcode Tools for Crystal Reports installation directory. They may be installed using the Fonts applet in the Windows Control Panel is required.
The sample report included with the kit is "Order Packing ListUFL.rpt" and will be found in the cr85, cr9 or cr11 subdirectory of the kits installation directory. This is a modified version of the "Order Packing List.rpt" report included with the Crystal Reports Xtreme Mountain Bike Inc samples. If you do not have the samples installed on your system then the modified sample report will not work and you should skip to the section "Creating a barcode on a report" below. The report displays barcodes using one of the AZTxx barcode fonts installed on your system; if for any reason that font cannot be found then the report will not display a barcode - but a collection of characters. (You can change the font used to display the barcode as described below, and the barcode will then display correctly.)
The "Order Packing ListUFL.rpt" sample may be run on a machine that contains a full Crystal Reports installation just by double clicking on the report file. A barcode is included on the report with its data taken from the one of the data fields.
Switching the report to Design view, Right-clicking on the barcode and selecting Edit Field Object from the drop-down menu displays the Function (DLCRbars) and parameters used to generate the barcode. The first parameter is the barcode data (a string), the second parameter is an integer that specifies the barcode type (code type 1 is Datamatrix); the third parameter may be used to specify the number of columns in the symbol, but may be "0" – in which case the size is automatically determined; the fourth parameter is for specifying a security level and may be "0" - in which case the security level is automatically determined; and the final parameter is the barcode Mode (for Datamatrix that’s 0 for Square or 1 for Rectangular).
More: