Crystal Reports Barcode Font Encoder UFL
-
Easily
create barcodes in Crystal Reports with fonts.
- Enables easy Change To Barcode functionality.
- Generates many linear barcode types including Code 128, GS1-128,
DataBar, Code 39, Code 93, Interleaved 2 of 5, UPC, EAN, Postnet
and Intelligent Mail.
- Compatible with Crystal Reports versions 7 and higher.
- Supports Visual Studio .NET environments.
- Compatible with Windows 95 and greater, including 32-bit and
64-bit versions of Windows Vista, Windows 7 and Windows Server 2008.
- Supports double-byte language settings when used with Databar
or Universal Barcode Fonts.
- Free to use with demo or purchased IDAutomation
barcode fonts.
Functions List | Support
| Native Generator
|
Font Formulas | Integration
Guide
| “This is easily the best software I’ve found for barcode
printing in Crystal by a long way -- I must have downloaded
6 or 7 other fonts and packages, but none are as easy to use
as this.” Michael Ainley, IT Manager, UK |
The IDAutomation Crystal Reports Barcode Font Encoder UFL is very
easy-to-use when generating barcodes in crystal reports. This UFL encoder
tool supports many linear barcode types including Code 128, GS1-128,
Code 39, Interleaved 2 of 5, UPC, EAN, DataBar, Postnet, Intelligent
Mail and more. Advanced
2D barcode fonts
such as Aztec, DataMatrix, PDF417, Maxicode and QR-Code must use the
UFL supplied with that specific package.

Crystal Reports Tutorial Index
Crystal Reports Version 7 to 11 Barcode Font
UFL Tutorial
- Install the IDAutomation demo or purchased
barcode fonts of
your choice. If unsure which font to use, consider IDAutomation's
Code
128 fonts, which are easy to use with this tool.
- When using Code 128 or
Interleaved 2 of 5, the
Universal barcode fonts must instead be used
if the character set is not US English, 1252 Latin-1, 1250 European,
1251 Cyrillic, 1253 Greek, 1254 Turkish, 1255 Hebrew or 1256
Arabic.
- This example uses the Code 128 Barcode Font Advantage Package.
Some font packages also include Font Formulas, which allow the
font-formatting routines to be embedded in a report without
the need for a UFL.
-
Download the Crystal Reports Barcode Font Encoder UFL. After
installation is complete, the barcode functions will show in the
formula editor under Additional Functions.
- For backward compatibility with previous report formulas,
IDAutomation also provides the
COM based Crystal UFL. If the earlier version of the UFL
is used, refer to the documentation in that package.
- Choose the Design tab to enter the design mode of the
report.
- Open the Field Explorer. In Crystal 9, select View
- Field Explorer. In versions prior to 9, select Insert -
Formula Field.
- Right-click on Formula Fields and select New.
- In the Formula Name dialog box, enter a name to identify
the formula field. In this example, the formula is simply named
"Barcode."

- Click OK and select Use Editor if asked. The Formula
Editor should now be open.
- In the Functions column, expand Additional
Functions and expand the IDAutomation section to
Select the appropriate function.
- If the IDAutomation functions do not show up in the Additional
Functions section after installing the UFL, copy the U25IDAutomation.dll
file from the Windows System directory (for example C:\Windows\System32)
to the directory where the Crystal DLLs are located.
- In Crystal 11 the file may be copied to C:\Program
Files\Common Files\Business Objects\3.0\bin;
- In Crystal 10 and previous versions the file
may be copied to %Windows%\Crystal where
%Windows% is
the directory where Windows is installed.
- Make sure the utilized function matches the font listed in the
Font To Use column. As an example, only use the
IDAutomation_Code128() function
with the IDAutomationC128 font.
- With the cursor positioned between the parentheses of the function,
select the data field that is to be encoded. Data fields used in
this formula must be formatted as text. If the data fields are not
text, use ToText or
cStr for conversion.
- The syntax of the formula should look similar to the formula
below which formats Field1 of Table1 to a Code
128 barcode font.
IDAutomation_Code128 ({Table1.Field1}) or
IDAutomation_Code128 (cStr(
{Table1.Field1},0 ) )
- Choose Save and then Close. If a "A string
is required" or similar error appears, convert the data to a string
with the cStr function.
For example:
IDAutomation_Code128 (Str( {Customers.CustNum},0
) )
- To include a text interpretation of the encoded data below the
barcode, consider creating an additional formula. In this example,
the formula is named BarcodeHR to return the "human readable"
text for Table1.Field1: {Table1.Field1}
- When creating
GS1-128 (UCC/EAN) barcodes which require specific text interpretations,
the appropriate HR function may be used for that purpose.
For example, to display the text for a GS1-128 barcode,
BarcodeHR is created with a different formula to return
the formatted text from Table1.Field1:
IDAutomation_Code128HumanReadable ({Table1.Field1})
- Return to the Field Explorer dialog box.
- Click on the formula field and drag it onto the report.

- Now that the fields have been created in the report, choose
the Preview tab to make sure the data is being retrieved
from the fields and properly formatted to the barcode font. Special
characters will append to the beginning and end of the data from
the fields, which are required for the start and stop characters
in the barcode.

Additional formatting may also be necessary that scrambles the
data which is normal for Code 128, Interleaved 2 of 5 and all functions
in the Universal barcode font and DataBar Font. The graphic above
shows the first field produced by the @Barcode formula and
the second produced by the @BarcodeHR formula.
- Select the Design tab again and size the barcode formula
field to display the appropriate barcode font in the report.
- Change the formula field to the appropriate barcode font and
set the size to 12 points or another appropriate size. Ensure the
formula used matches the font listed in the Font to Use column.
This is a very important step and the barcodes will not be properly
created if this step is performed incorrectly.
Note:
When selecting the font from the pull down menu, please do not
use the fonts that begin with the "@" Symbol. Instead, scroll down
in the list and select fonts that begin with "IDAutomation”.
- Select the Preview tab (or File - Print Preview)
to view the barcodes in the report. Print one page of the report
and test with a scanner.

Consider testing with the easy-to-use
IDAutomation USB Barcode Scanner, which reads all popular linear
and GS1 DataBar barcodes. When 2D Data Matrix, PDF417, QR Code,
Aztec or Intelligent Mail symbols need to be verified, IDAutomation
suggests the
IDAutomation 2D Barcode Scanner.
Turning fields into barcodes is a new functionality introduced in
Crystal Reports 12. When using Crystal versions below 12, the standard
UFL tutorial must be followed.
- Install the appropriate
barcode fonts.
If in doubt about which font to use, IDAutomation recommends the
Universal
Barcode Font for the Code 128 barcode.
- Download and install the latest version of
IDAutomation's Crystal Reports UFL. Only versions released March
2008 or later are compatible with the Change to Barcode functionality
introduced in Crystal Reports 12.
- Add a field to the report that contains the data that will be
encoded in the barcode. If necessary, a
formula field may be created
to append text or concatenate fields.
- Select the Preview tab (or File - Print Preview)
to confirm that the correct data appears in the field.
- Right-click on this field, choose Change To Barcode and
select from the list of installed barcode fonts, the type of barcode
to create.

- The barcode should be instantly created in the report. To create
a text interpretation, simply add the same field to the report again
and position it below the barcode as necessary.
- Print one page of the report and test with a
barcode scanner.
Many of IDAutomation's font packages include
Font Formulas, which allow font formatting routines to be embedded
in a report without the need for a UFL. These formulas are saved as
part of the report file (.rpt) and do not have any external dependencies,
with the exception of the required barcode font. When distributing reports,
consider this method or try the
Native Barcode
Generator for Crystal Reports, which creates dynamic embedded barcodes
without fonts.
Functions may be easily modified with formulas to combine multiple
fields or append text in a single barcode, as demonstrated in the following
examples:
- This formula appends the text "ECC200",
combines two fields in a single
barcode and places a tab function (which is ASCII 009)
between them:
IDAutomation_Code128ApplyTilde
( "ECC200" & {Table1.DataField1} & "~009" & {Table1.UPC})
- This formula adds in the
GS1-128 Application Identifier (~202) and calculates a MOD 10
check digit.
IDAutomation_Code128ApplyTilde
("~202" & {Table1.DataField1} & "~m19" )
UFL & Font Distribution with Crystal Runtime
Files
IDAutomation's Formulas for Crystal Reports require only the applicable
barcode font to be installed. IDAutomation's Crystal Reports Barcode
UFL is free to use and distribute in an application with the purchase
of any IDAutomation fonts package. The following runtime files
should be distributed with the application.
|
Crystal Reports UFL Files to Distribute
|
|
Type
|
File to Distribute
|
Notes
|
| Font File(s) |
???.ttf |
TrueType
fonts may be distributed with the purchase of a Developer License. |
| Crystal
UFL |
U25IDAutomation.dll |
The IDAutomation
Crystal UFL should be installed in the Windows System directory
(ex. C:\Windows\System32). |
The functions listed below are all available in the
Crystal Reports UFL
download are valid when used with the barcode font listed in the
Font to Use column. The data input type for all functions is a string.
|
Functions for Standard Barcode Fonts
|
|
Barcode Type
|
Functions
(View
Function Property
Descriptions)
|
Font to use
|
|
Code
11 |
IDAutomation_Code
11 (DataToEncode) |
IDAutomationC11 |
|
Code 128 |
IDAutomation_Code128 (DataToEncode)
Recommended for general barcoding purposes. |
IDAutomationC128 |
Additional Code 128 Functions
IDAutomation_Code128ApplyTilde (DataToEncode)
IDAutomation_Code128ApplyTilde() applies
Code 128 tilde processing to the barcode and is used to
create
GS1-128 or
encode functions.
IDAutomation_Code128A (DataToEncode)
IDAutomation_Code128B (DataToEncode)
IDAutomation_Code128C (DataToEncode) |
IDAutomationC128 |
IDAutomation_Code128HumanReadableTilde
(DataToEncode)
This method returns the human readable text for Code 128
barcodes, such as with GS1-128. |
Text Font |
|
Code 39 |
IDAutomation_Code39
(DataToEncode)
IDAutomation_Code39Mod43 (DataToEncode) |
IDAutomationC39 |
|
Code
93 |
IDAutomation_Code93
(DataToEncode) |
IDAutomationC93 |
|
Codabar |
IDAutomation_Codabar
(DataToEncode) |
IDAutomationCB |
|
EAN-13 |
IDAutomation_EAN13
(DataToEncode) |
IDAutomationUPCEAN |
|
EAN-8 |
IDAutomation_EAN8
(DataToEncode) |
IDAutomationUPCEAN |
|
Interleaved
2 of 5 |
IDAutomation_I2of5 (DataToEncode)
IDAutomation_I2of5Mod10 (DataToEncode) |
IDAutomationI25 |
|
MSI Plessey |
IDAutomation_MSI
(DataToEncode) |
IDAutomationMSI |
|
UPC-A |
IDAutomation_UPCa
(DataToEncode) |
IDAutomationUPCEAN |
|
UPC-E |
IDAutomation_UPCe
(DataToEncode) |
IDAutomationUPCEAN |
|
USPS IntelligentMail |
IDAutomation_IntelligentMail (DataToEncode) |
IDAutomationPOSTNET or
IDAutomationIMB |
|
USPS Postnet |
IDAutomation_Postnet (DataToEncode) |
IDAutomationPOSTNET |
|
USPS Planet |
IDAutomation_Postnet (DataToEncode) |
IDAutomationPOSTNET |
| Not Applicable |
IDAutomation_Mod10
(DataToEncode) |
not applicable |
|
Universal Barcode Font Functions
|
|
The functions listed
below are preceded with IDAutomation_Uni_
and should be used with
IDAutomation Universal Barcode Fonts or
IDAutomation DataBar Barcode Fonts. |
|
Barcode Type
|
Functions
|
Font to Use
|
|
Code 128 |
IDAutomation_Uni_C128 (DataToEncode)
C128() is recommended for general barcoding purposes.
|
IDAutomation_Uni
or IDAutomation
DataBar |
Additional Code 128 Functions
IDAutomation_Uni_C128ApplyTilde (DataToEncode)
IDAutomation_Uni_C128ApplyTilde() applies
Code 128 tilde processing and is used to create
GS1-128 or encode
functions.
IDAutomation_Uni_C128A (DataToEncode)
IDAutomation_Uni_C128B (DataToEncode)
IDAutomation_Uni_C128C (DataToEncode) |
IDAutomation_Uni
or IDAutomation
DataBar |
IDAutomation_Code128HumanReadableTilde
(DataToEncode) This method
returns the human readable text for Code 128 barcodes, such
as with GS1-128. |
Text Font |
|
Code 39 |
IDAutomation_Uni_C39
(DataToEncode,
N_Dimension,
IncludeCheckDigit) Example:
IDAutomation_Uni_C39 ("12345678",3,TRUE
) |
IDAutomation_Uni
or IDAutomation
DataBar |
|
Codabar |
IDAutomation_Uni_Codabar
(DataToEncode,
N_Dimension, StartChar, StopChar) Example:
IDAutomation_Uni_Codabar ("12345678",2,A,B ) |
IDAutomation_Uni
or IDAutomation
DataBar |
|
Interleaved
2 of 5 |
IDAutomation_Uni_I2of5 (DataToEncode,
N_Dimension,
IncludeCheckDigit) Example:
IDAutomation_Uni_I2of5 ("12345678",2,FALSE ) |
IDAutomation_Uni
or IDAutomation
DataBar |
|
MSI Plessey |
IDAutomation_Uni_MSI
(DataToEncode,
N_Dimension,
IncludeCheckDigit) |
IDAutomation_Uni
or IDAutomation
DataBar |
|
USPS IntelligentMail |
IDAutomation_Uni_IntelligentMail (DataToEncode) |
IDAutomation_Uni |
|
USPS Postnet |
IDAutomation_Uni_Postnet (DataToEncode,
IncludeCheckDigit) |
IDAutomation_Uni |
|
USPS Planet |
IDAutomation_Uni_Planet (DataToEncode,
IncludeCheckDigit) |
IDAutomation_Uni |
|
DataBar Functions
|
|
The methods listed below
are preceded with IDAutomation_DataBar_
and are only to be used with the
IDAutomation GS1 DataBar Font. |
|
Barcode Type
|
Functions
|
Font to use
|
|
DataBar |
IDAutomation_DataBar (DataToEncode) |
IDAutomation
DataBar 34 |
|
DataBar Expanded |
IDAutomation_DataBarExpanded (DataToEncode) |
IDAutomation
DataBar 34 |
|
DataBar Expanded Stacked |
DataBar Expanded Stacked requires a
custom formula field
to be copied from the sample report provided. |
IDAutomation
DataBar 34 |
|
DataBar Limited |
IDAutomation_DataBarLimited (DataToEncode) |
IDAutomation
DataBar 13 |
|
DataBar Stacked |
IDAutomation_DataBarStacked (DataToEncode) |
IDAutomation
DataBar 13 |
|
DataBar Stacked Omnidirectional |
IDAutomation_DataBarStackedOmniDirectional (DataToEncode) |
IDAutomation
DataBar 34 |
|
DataBar Truncated |
IDAutomation_DataBar (DataToEncode) |
IDAutomation
DataBar 13 |
- DataToEncode: a string value
that represents the data being encoded.
- N_Dimension: determines the
width of the wide bars that is a multiple of the X dimension. Valid
values are 2, 2.5 and 3. The default is 2. The X dimension is determined
by the font point size.
- IncludeCheckDigit: a
Boolean value that determines whether a check digit should be automatically
calculated and included for the DataToEncode.
- ApplyTilde: when ApplyTilde
is set to "1" in Code 128 with the Auto character set, the format
~ddd may be used to specify the ASCII code of the character to be
encoded and
several other tilde options are enabled.
This procedure inserts a formula field for
DataBar Expanded Stacked symbols and is compatible with Crystal
Reports version 9 and up. This is a necessary step to ensure that DataBar
Expanded Stacked symbols are created properly in Crystal Reports.
- Install the package and open the Crystal Report example provided.
- Choose View - Design to switch to design mode.
- Highlight the
@IDAutomation_DataBarExpandedStacked field and choose Edit
- Copy.
- Open the report choose Edit - Paste to paste the field
where it is desired.
- Highlight the field and choose Edit - Edit Formula.
- Modify the "DataToEncode:="
line of the formula to equal the data that is to be encoded
in the barcode.
- Change the "Segments:= 4;"
line of the formula to equal the number of
segments needed.
The complete formula should look something
similar to:
stringVar
DataToEncode:= {Table1.DataField1}; numberVar Segments:=
6; stringVar CompleteBarcodeString:=""; numberVar i:=0;
numberVar DataSegments:= ToNumber (IDAutomation_DataBarExpandedStackedSet(DataToEncode,Segments));
For i:=1 to DataSegments Do ( CompleteBarcodeString
:= CompleteBarcodeString + IDAutomation_DataBarExpandedStackedGet(DataToEncode,Segments,i);
); CompleteBarcodeString
- Continue implementation and testing with Step
11 of the tutorial.
Crystal Reports Barcode Font Integration Support
Free product support is available by reviewing the
font problems and solutions information that IDAutomation has documented
and by searching resolved
public forum threads.
Pre-sales and existing customer support is available by
contacting IDAutomation, and additional technical support may be
attained with the purchase of the one year
Priority Support
and Upgrade Subscription.
Common Issues and Notices
- IDAutomation_DataBarExpanded Function Crashes the Report
or Generates an Error.
This error may occur when the barcode
function used generates over 254 characters. Follow the procedure
to copy the custom formula field
from the sample report provided.
- USPS_EAN128 Function no Longer Provided, Replaced by Code128ApplyTilde().
Used for 22-digit USPS special services labels such as
delivery confirmation in EAN128 according to the USPS Delivery Confirmation
Service as defined in the September 2002 version of Publication
91. This is used with IDAutomation's Code 128 font IDAutomationC128L
at 16 points. The following formula will create USPS_EAN128 in Code
128 with the Code128ApplyTilde() function:
IDAutomation_Code128ApplyTilde ("~202"
& "912312214123442441134" & "~m19" )
Where the number
of 912312214123442441134 may be replaced with the user's data field,
for example:
IDAutomation_Code128ApplyTilde
("~202" & {Table1.DataField1} & "~m19" )
This number
encoded is made up of the following: 2 digit service code + 9 digit
customer ID + 8 digit sequential package ID + MOD 10 check digit.
For more information, refer to the
USPS portion of the Code 128 FAQ and the UCC/EAN portion of
the
Code128 Barcode FAQ.
- SCC14 Function no Longer Provided, Replaced by Code128ApplyTilde().
The following formula will create SCC14
in Code 128 with the Code128ApplyTilde() function:
IDAutomation_Code128ApplyTilde ("~202"
& "013001234567890" & "~m13" )
For more information,
refer to the UCC/EAN portion of IDAutomation's
Code128 Barcode FAQ.
- SCC18 Function no Longer Provided, Replaced by Code128ApplyTilde().
The following formula will create SCC18 in Code 128 with
the Code128ApplyTilde() function:
IDAutomation_Code128ApplyTilde ("~202"
& "0000801234999999999" & "~m17" )
For more information,
refer to the UCC/EAN portion of IDAutomation's
Code128 Barcode FAQ.
2D Crystal Report Barcode Font Integration
Related Products and Information
Back to Top
|