views:

567

answers:

2

I have a crystal report that I have to add a Bar Code to. I have downloaded some free and demo TrueType fonts Code 39, Code 128 and UPC from various sources. When I print out the report I can see the bar code but it will not scan with my scanner(the scanner works as I have tested it on multiple other bar codes). Do I need to use something special with Crystal Reports to create a bar code that a scanner can read?

(I have tried printing it on a label printer designed for printing labels so I don't think it is an issue with the paper/resolution)

+3  A: 

Barcodes have check digits embedded in them, and you need to reproduce that in addition to using the font. I believe there are third party libraries for Crystal that properly format barcodes so they are scannable.

Robert
Have you used one of these 3rd party libraries? Which one works... Any free??
runxc1 Bret Ferrier
I don't do the Crystal stuff around here, but I think we used Azalea. Some years ago I found a sample for formatting Code128 and adapted for our use. I don't know of anything free, but some of the formatting rules are available for you to implement.
Robert
+2  A: 

Indeed most barcodes have checksums and/or leading & trailing characters.

The most simple one is Code 3 of 9. To use it you need to start and end the code with an *.

Examples:

  • to print ABCD you need to use *ABCD*

Some characters require to be escaped as well:

  • to print #123! you need to use */C123/A*

More info on Code 3 of 9.

Marc