Step 1 - Character Set Setup for American_America.UTF8
- The Native PLL uses Unicode characters to create the barcode. In order to correctly display the barcode, a character set within the Environment Variables must be set to UTF8.
- Unix and Linux users:
- Set the NLS_LNG 3rd field, use the command % setenv NLS_LANG American_America.UTF8. In Linux, use the command $ export LC_ALL=UTF-8.
- Windows users:
- Right-click My Computer and select Properties.
- Select the Advanced tab and then Environment Variables.
- In the System Variables section, create a new variable.
- Set the Variable name to: NLS_LANG and the Variable
value to: American_America.UTF8.
Step 2 - Oracle Reports Barcode PLL Library Installation
- This PLL library is compatible with any version of Oracle Reports that supports attached libraries. It was developed and tested against Reports 9i. If used in the database itself, the version of the database would be any version that supports PL/SQL. If needed, the PL/SQL source code may also be provided with the purchase of an Unlimited Developer License and a signed Source Code Agreement.
- 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.
- Select the IDAutomation_Linear_Native.pll file from the operating system.
- Press the Attach Button.
- A dialog box will appear asking to remove the path. If "Yes" is selected, the PL/SQL library will need to be reattached 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 functions in the library are now ready to be used in the report.
- Once the library is attached, the Object Navigator should look similar
to the following under Attached Libraries:
Step 3 - Oracle Reports Formula Setup
- 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 so it is large enough to contain
the entire barcode.
- The properties of the newly added Formula Column need to be adjusted
to call the PL/SQL function from the IDAutomation_Linear_Native.pll
library. Access the property page for the Formula Column by selecting
the Formula Column and pressing the F4 key. The following window will
- 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 -- Enter 65500 as the width of the field or the maximum number allowed. This large width is needed to hold the many characters that may be returned to generate the barcode.
- Click on the PL/SQL Formula button within the Property Inspector
to call the appropriate IDAutomation.com function.
- At the cursor, insert the appropriate
IDAutomation.com PL/SQL function call. This function will generate
the barcode in a unicode text string.
- In the above example, a constant value (123456789012) was passed into the function, whereas an appropriate text field may be substituted from the database in a production environment.
- 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
- 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:
- required Source -- Select the name of Formula Column that was created earlier.
- required Width -- Verify the width is 65500 or greater.
- optional Name -- Choose a descriptive name for the field.
- Set the font to Courier New or another
unicode mono-spaced font at 3 points, or another size according
to the chart below. If the font selected is not a mono-spaced font,
the barcode created will not be correct and will not scan, even though
it may look correct.
Approximate X Dimension
2 08 Mils 3 12 Mils 4 16 Mils 5 20 Mils 6 24 Mils 7 28 Mils 8 32 Mils
- Select Format - Text spacing - Custom
- Other and set the line spacing to 0. This setting is necessary to
eliminate white horizontal lines that may appear in the symbol.
- Remove the border surrounding the barcode by setting the Line Color
on the left panel to the background color of the layout, which should
- If it is desired to have a text interpretation appear below the barcode, add the appropriate formula column to the report just below the symbol.
- To compile the report, click on Program, Compile, All.
- Click on the Paper Design toolbar to run the report.
- Print and scan the barcode to ensure the correct data is encoded. If a scanner is needed to verify barcodes, IDAutomation offers several hand-held scanner kits.