Setups to build a report with barcode

Description: This blog post details about the setup steps required when building a report with a barcode.
Following files are used:

·         IDAutomationC128M.ttf: Include this font in the fonts folder of C:\Windows

·         IDAutomation.pll: Import this pll to the program units of the report.

You can download the pll & ttf files from IDAutomation.com

The setups are applicable to Oracle Reports Developer - Version: 3.0.5 to 10.1.2.3 - Release: Developer/2000 2.1 to 10gr2.

Information in this post applies to any platform.

In this case, the report will use the IDAutomationC128M barcode. This Barcode requires a Start and End code to allow a scanner to read the barcode.


Setups:

1. Download and install the font on the machine that Reports Builder and Server will be running.
·         Windows is a simple matter of copying the IDAutomationC128M.ttf to the C:\WINNT\fonts directory.


·         UNIX is very complex. It will be detailed in another blog post.

2. Import the PLL: IDAutomation.pll to the report program units as shown below.






3. Create the report and reference the new barcode font (IDAutomationC128M) in the layout model

      

4. Verify that the output displays the barcode. The layout field will display accordingly on selecting the IDAutomationC128M Font.



5. Edit the Property palette and refer the corresponding source for the field.
6. Create a format trigger to encode the value:
Check the blog post on set_field_char: http://oracleapps4u.blogspot.com/2011/04/srwsetfieldchar.html
Example:
 function F_1FormatTrigger return boolean is
 begin
   
        srw.set_field_char(0,idautomation.code128b(:input));
    return (
TRUE);
 end;


7. Compile and close the trigger.
8. Now the barcode is encoded with start and end codes.


An example on a report with barcode is detailed in the blog post:
http://oracleapps4u.blogspot.com/2011/04/example-barcode-report.html