Friday Dec 21, 2012

Generating barcodes in reports

I recently had a comment posted on a previous blog post regarding generating barcodes in the reports that come with the records management module (either in WebCenter Content/UCM or WebCenter Content: Records/URM).  

I knew we could output barcodes because we do  in some of the default reports that come with the product.  But even when looking at those rich-text templates, it wasn't clear how they were defined.  So I did a little digging and discovered the code needed to be added to those fields to do the barcode magic.  I won't repeat the steps on how to update/create the custom reports from my earlier post, but will just cover the few extra steps for barcodes.

Once you have your field input into the template in Word, right-click on the field and choose BI Publisher -> Properties.  Click on the Advanced tab and you should see the box for Code with the field you are outputting surrounded by <?field_name?>. For barcodes, you'll want to enter this in that code field:

<?register-barcode-vendor:’oracle.xdo.template.rtf.util.barcoder.BarcodeUtil';'XMLPBarVendor'?><?dBarcodeFormated?>*<?dBarcode?>*<?format-barcode:dBarcodeFormated;code39;XMLPBarVendor?>

Just replace dBarcode with your field name (e.g. dDocName, xComments, etc).  

code

Next, you'll want to change the font on the field to be 'BC 3of9'.  This font should have been added when the BI Publisher Desktop add-in for Word was installed.

font

Now simply follow the steps to add the template to the repository and configure the appropriate reports.  Now when the reports are run, it should provide the values in barcodes.

report

One thing I noticed is when I saved the Word document in rich-text format, I was no longer able to re-open that rtf file and get back to the code for the field properties.  But in Word's default doc format, I was.  So if you think you might need to edit the report later on, it's probably a good idea to save a copy in doc format as well. 

About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« December 2012 »
SunMonTueWedThuFriSat
      
1
2
4
5
6
7
8
9
11
12
13
14
15
16
17
18
19
20
22
23
24
25
26
27
28
29
30
31
     
Today