Oracle Reports Barcode Font Tutorial & Integration
Guide
This IDAutomation tutorial is designed for implementing barcodes
in Oracle Reports with the IDAutomation PL/SQL Barcode Library and IDAutomation
barcode fonts. The barcode library is a PLL file that formats data from
fields in the report to the barcode fonts, to create a correct barcode.
The library contains functions for Code 128, Code 39, GS1, Codabar,
UCC/EAN 128, Interleaved 2 of 5, UPC and EAN barcodes.
IDAutomation also provides the
Java Barcode Package,
which is easier to implement
in Oracle
Reports for versions 9i, 10g and above. Additionally, the
Java
Package is much easier to use in Unix and Linux environments. Additional
options are also provided at IDAutomation's
Barcode Integration Guide
and Tutorial for Oracle Reports.
Oracle Barcode Font Implementation Tutorial
Step 1 - Install the Barcode Fonts
IDAutomation offers a wide variety of
barcode fonts
for various purposes. If in doubt about which to use, IDAutomation recommends
using Universal
Barcode Font with the
Code 128 function. To
install IDAutomation's barcode fonts on Windows for Oracle Reports,
run the INSTALL.EXE file included in the font package or follow the
font installation procedures. Because of the complexities
and several different distributions of Unix and Linux systems, IDAutomation
does not provide installation assistance for Unix and Linux systems.
However, IDAutomation does provide two sets of installation instructions
that may help as a guide:
-
Installing Fonts on Unix for Oracle Reports
- Font
Installation on Unix and Other Systems
IDAutomation recommends using the
Java
Solution if possible for Unix and Linux environments.
Step 2 - Oracle Reports Barcode PLL Library Installation
This PLL library is compatible with any version of Oracle Reports
that supports attached libraries. The IDAutomation.pll was developed
and tested against Reports 6i and the IDAutomation_Universal.pll is
compatible with 10g and above. If used in the database itself, then
the version of the database would be any version that supports PL/SQL.
PL/SQL source code is also provided for advanced Oracle developers in
the IDAutomation.pkg file. Watch the
How to create a barcode in Oracle Reports video.
- Open Oracle Reports Builder.
- Open the report rdf file that will contain the barcodes.
- Select the attached libraries option.
- Press the create button (Green Plus symbol) on the left toolbar.
- In the dialog box, select the File System radio button, click
on the Browse button.
- Download the
Oracle Barcode Library Package which contains the IDAutomation.pll
and IDAutomation_Universal.pll files. After decompressing, save
these files to an appropriate directory.
- Select the IDAutomation.pll
or the IDAutomation_Universal.pll
file and choose the Attach Button. If in doubt about which to use,
IDAutomation recommends using the
IDAutomation_Universal.pll
file with the
IDAutomation
Universal Barcode Font.
- A dialog box will appear asking to remove the path. If "Yes"
is selected, the PL/SQL library will need to be re-attached to the
report every time the report is opened. If "No" is selected, it
will always look for the path in the same location. It is preferable
to leave the library in the same directory as the report.
- The barcode functions in the library are now ready to be used
in the report. After the library is attached, the Object Navigator
should look similar to the screen shot below; which shows the attached
IDAutomation_Universal.pll:

Step 3 - Setup the Function Call with the Appropriate Barcode Font
- IDAutomation's barcode library contains many
function calls for linear
barcodes as described in the method
table. Add a Formula Column to the report by using the Data
Model option of the Report Layout, clicking the Formula Column button
on the toolbar, and sizing the column in the layout area.

- The properties of the newly added Formula Column need to be
adjusted to call the PL/SQL function from the IDAutomation.pll library.
Access the property page for the Formula Column by selecting the
Formula Column and pressing the F4 key. The following window will
appear:

- Adjust the following properties:
Name - Choose a descriptive name for the Formula Column because
the columns will need to be referenced when designing the layout
of the actual report.
Datatype - This must be selected as Character from the drop-down
menu.
Width - Ensure the width of the field is large enough to hold all
characters for the encoded data.
- Click on the PL/SQL Formula button within the Property Inspector
to call the appropriate barcode function. The following screen should
appear:

- At the cursor, insert the appropriate
function call. This function
will add the appropriate start and stop characters, encode the data
(if necessary) and add the check sum character (if required).

- Please note in the above example, that a constant value (Code128Test)
was passed into this function, the appropriate character field may
be substituted from the database, if necessary.
- Click Close in the above window and ensure the report has been
saved.
- To add this Formula Column to the report, switch to Paper Layout
mode for the report and add a Field object to the report by clicking
the appropriate item in the toolbar and dragging into position on
the report.

- Once the Field has been added to the report, it needs to be
linked to the Formula Column that was created earlier. To link the
Field to the Formula Column, select the field and hit the F4 button
to bring up the Property Inspector for the Field. The Property Inspector
should look similar to the following:

- Adjust the following properties:
Name - Choose a descriptive name for the field (optional)
Source - Select the name of Formula Column that was created earlier
(required)
- Modify the font of the field to the appropriate barcode font
according to the function chart.
|
Oracle Reports
Barcode Font Functions |
| The
methods listed below
are only to be used with IDAutomation.pll and the appropriate
barcode font. IDAutomation strongly recommends using the
IDAutomation
Universal Barcode Font with the appropriate
Universal Function when generating
Code 128 or Interleaved 2 of 5 barcodes. |
| Function |
Font to use |
Notes |
Code128(DataToEncode,
ReturnType) |
IDAutomationC128 * |
This is a "Code 128 Auto" function that will
automatically encode text data from ASCII 1 to ASCII 127. IDAutomation
recommends using the
IDAutomation
Universal Barcode Font with the
Universal Font Methods
in the following situations:
- When the IDAutomationC128 font is used
outsize of the USA, to avoid language and locale incompatibilities.
- When creating barcodes for GS1-128 (UCC/EAN
128) or when encoding FNC1 or FNC2 functions.
- When it is necessary to encode functions
such as the return or tab.
It may be necessary to use the optional ReturnType
for special purposes:
(Data, 0) formats barcode output string for the Code 128 barcode
fonts.
(Data, 1) returns the human readable data.
(Data, 2) returns only the check digit.
|
| Code128a(DataToEncode) |
IDAutomationC128 * |
Formats output to the
Code 128
barcode fonts, character set A. |
| Code128b(DataToEncode) |
IDAutomationC128 * |
Returns codes formatted to the Code 128 character
set B. Formats output to the
Code 128
bar code fonts. |
| Code128c(DataToEncode) |
IDAutomationC128 * |
This code128 function "interleaves" numbers
into pairs for high density. |
| I2of5(DataToEncode) |
IDAutomationI25 *
or
IDAutomationHI25 * |
This function "interleaves" numbers into
pairs for high density without check digits and formats the
return string to the
Interleaved 2 of 5 fonts. |
I2of5Mod10(DataToEncode,
ReturnType) |
IDAutomationI25 *
or
IDAutomationHI25 * |
(DataToEncode, 0) performs the mod10 checksum
calculation for increased accuracy and formats the return string
to the
Interleaved 2 of 5 fonts.
(DataToEncode, 1) returns the human readable data with the MOD10
check digit included.
(DataToEncode, 2) returns the MOD10 check digit. |
| * When using the IDAutomationC128
or IDAutomationI25 fonts outside of the
USA or for GS1-128, IDAutomation recommends using the
IDAutomation
Universal Barcode Font with the appropriate
Universal Function to avoid language
and locale incompatibilities. |
Code39Mod43(DataToEncode,
ReturnType) |
IDAutomationC39
or
IDAutomationHC39 |
(DataToEncode, 0) performs the mod43 checksum
calculation for increased accuracy and then formats the output
to print using
Code 39
fonts. The mod43 checksum is usually required for LOGMARS
and HIBC applications.
(DataToEncode, 1) returns the human readable data with the check
digit included.
(DataToEncode, 2) returns only the check digit. |
| Code93(DataToEncode) |
IDAutomationC93 |
Formats the output to print with the 2 required
check digits using
Code 93
fonts. |
| Codabar(DataToEncode) |
IDAutomationCB |
Formats the output to print using
Codabar
fonts. |
| EAN13(DataToEncode) |
IDAutomationUPCEAN |
DataToEncode is a number string of 12, 13,
14, 15, 17 or 18 digits with or without a check digit, add-ons
are supported. Formats output to the
UPC/EAN
barcode font. |
| EAN8(DataToEncode) |
IDAutomationUPCEAN |
DataToEncode is a number string of 7 or 8
characters (EAN-8 without the check digit). Formats output to
the UPC/EAN
barcode font. Entering incorrect data will create a barcode
containing all zeros. |
Postnet(DataToEncode,
ReturnType) |
IDAutomationPOSTNET
or
IDAutomationPLANET |
Enter a single string of Zip, Zip + 4 or
Zip + 4 + Delivery Point or any number of digits for the planet
code. The DataToEncode must be a number and can include dashes
and spaces.
(DataToEncode, 0) formats output to the
POSTNET
barcode fonts.
(DataToEncode, 1) returns the human readable data with the check
digit included.
(DataToEncode, 2) returns only the check digit. |
| UPCa(DataToEncode) |
IDAutomationUPCEAN |
DataToEncode is a UPC-A number string of
11, 12, 13, 14, 16 or 17 digits with or without a check digit,
add-ons are supported. Formats output to the
UPC/EAN
barcode font. |
|
Oracle Reports
Universal Barcode
Font Functions |
| The
methods listed below
are only to be used with IDAutomation_Universal.pll and
the IDAutomation
Universal Barcode Font Advantage™. |
| Function |
Font to use |
Notes |
| Code128(DataToEncode,
ApplyTilde) |
IDAutomation_Uni |
The recommended and primary
Code 128 function that automatically encodes all text from
ASCII
1 to
ASCII 127. This method
contains many options for encoding GS1-128 and includes tilde
options to encode functions such as tabs and returns. |
| Code128A(DataToEncode) |
IDAutomation_Uni |
Formats output to set A
of Code-128. Use caution with this option because any lowercase
character creates a
function. Use the letter "i" for a tab and "m" for a return.
For most purposes, it is better to use the
C128() function instead of this one. |
| Code128B(DataToEncode) |
IDAutomation_Uni |
Formats output to Code-128,
character set B. For most purposes, it is better to use the
C128() function instead of this one. |
| Code128C(DataToEncode) |
IDAutomation_Uni |
This code128 function "interleaves"
even numbers into pairs for high density. An even number of
digits is required. For most purposes, it is better to use the
C128() function instead of this one. |
| Code39(DataToEncode,
N_Dimension,
IncludeCheckDigit) |
IDAutomation_Uni |
Formats the output for
bar-coding in Code 3 of 9 with the universal font. A MOD 43
checksum will be calculated if
IncludeCheckDigit is true. |
| Codabar(DataToEncode,
N_Dimension, StartChar,
StopChar) |
IDAutomation_Uni |
Creates Codabar (aka NW7)
with the universal font. StartChar and StopChar are also required
as the start and stop characters. Valid start and stop characters
are A, B, C and D. |
| I2of5(DataToEncode,
N_Dimension,
IncludeCheckDigit) |
IDAutomation_Uni |
This function "interleaves"
numbers into pairs for high density without check digits and
formats the return string to the universal font. An even number
of digits is required. A MOD 10 checksum will be calculated
if IncludeCheckDigit is true. |
| Planet(DataToEncode,
IncludeCheckDigit) |
IDAutomation_Uni |
NOTE: Because this bar-code
type has a specific height requirement, this function only works
with the XS, S or M size of the Universal Font. XS is
the normal version, S has the bars narrow by 10% and
the M font has the bars narrow by 20%. DataToEncode is
a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point.
A MOD 10 checksum will be calculated if
IncludeCheckDigit is true. |
| Postnet(DataToEncode,
IncludeCheckDigit) |
IDAutomation_Uni |
NOTE: Because this bar-code
type has a specific height requirement, this function only works
with the XS, S or M size of the Universal Font. XS is
the normal version, S has the bars narrow by 10% and
the M font has the bars narrow by 20%. DataToEncode is
a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point.
A MOD 10 checksum will be calculated if
IncludeCheckDigit is true. |
Description of the Parts of the Functions:
- DataToEncode - this is a string value
that represents the data being encoded.
- N_Dimension - determines the width
of the wide bars which 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 - If the ApplyTilde option
is set to True, characters following the tilde may be used to
perform additional calculations or
encode ASCII characters directly.
LICENSE NOTICE: This component may be incorporated in the application
only if there is a valid license from IDAutomation.com, Inc. for the
associated barcode font.
Redistribution of IDAutomation's fonts and components requires a Developer
License.
Related Links:

© Copyright 2010 IDAutomation.com, Inc., All Rights Reserved.
Legal Notices. |
|
|
|
|