~Note~

Please note that you can always click on an image in my postings and it will render a clear full sized version in a separate browser page! Also please note that this blog is best viewed with Firefox and Chrome
Google
 

Saturday, October 27, 2007

BI Publisher Barcoding in Oracle Applications 11i Tips

(to see a follow-up and more in-detail posting related to this post, go here- link) Now that I have some nice screen shots to accompany this, here we go. Note: I did use some of the material that can be found on Tim Dexter's Oracle BI Publisher Blog, just to give some due credit. I merely added more details for some of you that like to SEE things working too.

First, this will not cover how to develop a BI Publisher Template, that is a whole 'nother topic. This will also not talk about how to register the template or the data definition in Oracle Applications. That will be covered in another posting as well. This is more focused on how to get barcodes installed, into your templates, and to make sure they're registered in Apps as well and appearing on your reports.


Finally I will be covering some 2-d barcoding later. This post is for standard 1-d barcodes. For those that don't know, 2-d barcodes are the funky blurry looking square barcodes that UPS, Federal Express and some others use. It lets them scan the barcode in any direction, not just up and down.

1. Install the barcode font in your WINDOWS_HOME/fonts directory

2. Check your fonts directory to make sure you have the font installed and it is present.

3. To test the output you need to let the publisher engine know where the font is on the desktop. Under the Bi Publisher client install directory you'll find a config directory and under there an 'xdo example.cfg' file. Here I also show a finished xdo.cfg file too. NOTE that any time I reference this xdo.cfg file, I am referring to the local file on your machine. Editing this won't help you see fonts in Oracle Apps- you need to load the font to Apps to see your templates using it there. This is also covered below. I mention the xdo.cfg file because people like to test templates locally on their own computer first.

Open it up and you'll see a sample entry for a font:


Here is an example of an 'after' of what your changes may look like in this file: (note the directory and that we are only showing the portions we changed with respect to the above XML)

font family="CarolinaBar-B39-25D1"
style="normal"
weight="normal"
and...
truetype path="C:\WINDOWS\Fonts\CarolinaBar-B39-25D1-Normal.TTF"

Note you can have more entries too, for example if you need a font to be in italics, or another entry if you need the font to be in bold. Then again, remember we are dealing with barcodes here... :) Just change the entry to point to your font via the path and for the family attribute put in the name you see in Word when selecting the barcode font.

4. Rename the file to xdo.cfg for the changes to take effect.

5. Open Word, and test your template. I will use this standard template seen below. Note the fields near the top in the Vendor and the Ship To boxes.


6. Now we need to make sure also we have an asterisk * placed just before and after our fields that need to be coded into barcodes. These are wrapping or ‘escape’ characters for the barcode. So do this as seen in the next picture:


7. Then, using Microsoft Word, I highlight the fields that will be barcoded, as can be seen below. I then proceed to choose from the font menu my barcode font of choice for those highlighted areas. Note you must have registered them properly to even be seen in Word.


8. And there we have it seen below, at least in the template!


Now you need to deploy to the server. The template is simple enough, but we need the server publisher engine to know the location of the font. For both EBS and standalone there is an interface to load the font to the server, the steps are now pretty straightforward. In EBS just use the Font Manager.

Many of you will have seen the Administrator module on the Template manager in the E Business Suite ... the new properties UI is great and much easier to use but you can now also manage those troublesome MICR, Barcode and other fonts through the manager too.

XML Publisher 5.6 has a new tab: Administration. This replaces the xdo.cfg configuration file. Now fonts can be uploaded and stored in the database instead of stored on the file system.

Under the Administration tab are sub tabs: Configuration, Font Mappings and Font Files and Currencies.

To install a font requires only a few steps.

1. Log in as XML Publisher Administrator.

2. Navigate to Administration->Font Files->Create Font File.


3. Fields are 'Font Name' and 'File'. For Font Name choose any descriptive name. File will browse your PC to locate the font file.

4. Navigate to Font Mappings Tab->Create Font Mapping Set.



5. Mapping name is the name you will give to a set of fonts.

6. Mapping code is the internal name you will give to this set.

7. Type: 'PDF Form' for PDF templates. 'FO to PDF' for all other template types.

8. Now, Create Font Mapping (this allows you to add multiple fonts to a font mapping set). After you created the Font Mapping Set itself, you need to look in the bottom right AGAIN and choose the button Create Font Mapping (this allows you to add multiple fonts to a Mapping Set that you just created). Screenshot of the new screen below:


9. Note: Font Family is the exact same name you see in Microsoft Word under Fonts.
If you don't use the same name the font will not be picked up at runtime. THIS IS IMPORTANT!
10.The following screen shot shows us a screen with a font mapping set, with 2 font mappings inside of it. You can see the font family how it is defined:
Note the font family MUST match the font name (not Filename) in the fonts directory that you uploaded the font from! Look below!


10. Style and weight must also match how you use the font in windows.
Normal and Normal are good defaults. If you want bold or italics, you must have the fonts registered in the windows directory we discussed, as well as in your xdo.cfg file.

11. Navigate to Configuration General-> FO Processing->Font Mapping Set.
This can also be done at data definition and template level under Edit Configuration.
A screenshot below shows the way to get to the Edit Configuration if you need to do it AT the d
ata definition or template level. :


Hierarchy is Site-> Data Def -> Template.

13. Select your new mapping set.


14. Make sure the font is not referenced under File->Properties->Custom in the RTF template file.

15. Upload a template that uses your special font and test using preview or in EBS.