Printing Code 128 Bar Codes in Crystal Reports
When you need to print brcodes in your Crystal Reports report, your simplest choice is to use Azalea’s free User Function Library (UFL) along with our TrueType Code 128 fonts. Our UFL will make a scannable Code 128 barcode by appending start and stop bars to your input string, calculating the necessary check digit(s), and then mapping output into our fonts’ character set. You will want to use our Code 128 UFL because you can not simply format a chunk of text in a barcode font and create a scannable Code 128 bar code symbol. The UFL does all of the heavy lifting for you.
1. As long as you followed the default install in C128Tools for Windows, the installer will install the files you need to use the fonts with Crystal Reports. You just need to open the Crystal Reports file with the information you need to make into barcodes.
2. In the Crystal Reports menu, create a new formula.

3. Give your formula a name.

4. Choose your Code 128 function. In this case, we’ll use Code 128 Code Set B. Click twice on the BarcodeC128B function and then click twice on the field name.
If you’re making a GS-1 128 or UCC/EAN 128 barcode, this matters, but if you’re making an ordinary Code 128 barcode ignore this part: a GS-1 128 barcode requires the FNC1 character at the beginning of the string to be encoded. The FNC1 is mapped to Chr(238) in our fonts and therefore must be part of your formula.
Barcode128C(Chr(238)+"0108412345678905") or Barcode128C(Chr(238)+{database.field})

5. Choose Save and Exit from the Formula Editor.

6. Drag an instance of your formula onto your form, and then resize it to fit your barcode.
Format it into an Azalea Code 128 font; in our example, Code128Wide font at 36 points.

7. You’re ready to run your report with our barcodes integrated right in.

8. Once you’re ready to print your barcodes, choose “print” and send your report to a local printer as usual. If the output result differs or you see boxes or odd characters, please send a screenshot to technicalsupport at azalea dot com and we’ll be happy to help you get it sorted out.





