Overview
Barcode fonts may be used on Crystal Reports to allow users to scan barcode information into external programs or devices.
Requirements
- Must have the relevant barcode fonts installed on each system in the C:\Windows\Fonts folder.
- Must have the barcode dll installed on each system in the C:\Windows\System32\ for 32-bit or C:\Windows\SysWow64 for 64-bit.
<div style="margin-left: 20px;"> {{ :barcode_font_dll_u2ldfont.zip|}} </div>
Cautions
None
Bar Code Types
Code 39
- Best to use Code39AzaleaWide2 as the font within Crystal Reports.
<div style="margin-left: 20px;"> {{ :barcode_code39azalea_fonts.zip|}} </div>
- All barcodes must have an asterisk at the front and end of every barcode. These serve as delimiters, if they are not present then it will not be read as a valid barcode.
<div style="margin-left: 20px;"> </code> </div>
“*” + ToText({TransHeader.OrderNumber}) + “*”
</code>
DAR 128
- Best to use DAR28 Code 128 as the font within Crystal Reports.
<div style="margin-left: 20px;"> {{ :barcode_dar128_fonts.zip|}} </div>
- All barcodes must begin with a tilde ~ at the front of every barcode. The tilde serves as a delimiter, if it is not present then it will not be read as a valid barcode.
<div style="margin-left: 20px;"> </code> </div>
“~” + ToText({TransHeader.OrderNumber})
</code>
Within Control
If you intend to use barcodes within Control then you must use a custom function named DLFontCR( ) to allow Control to read and know how to act on those barcodes.
- Control only supports DAR 128 barcodes.
- Every barcode must follow this format. ~ ClassTypeID.DatabaseField
<div style="margin-left: 20px;"> </code> </div>
DLFontcr (“~”+ ToText({Part.ClassTypeID},0,“”) + “.” + ToText({Part.ID}, 0, “”), “7”, “0” )
</code>
- The decoded format of a barcode in Cyrious is ~cccccc.iiiiii where:
- ~ (tilde) indicates that what follows is a bar code.
- cccccc is the ClassTypeID of the particular data item.
- iiiii is the database ID of the particular data item.
- The scanner should be set up to send a CR/LF after each scan. This may be the default, but many scanners are configurable.
Tools
- ZBar Barcode Reader is a free iPhone application that reads numerous barcode fonts. This free app is very useful in testing barcodes on the reports, you can even scan them directly from the computer monitor in most cases.
Source
Contributor: Brandon Readlinger, Cyrious
Date: 7/28/2014