Streaming Barcode Images into Oracle BI Publisher

Barcodes may be placed in BI Publisher with IDAutomation's Dynamic Barcode Generator Service. When using this service to stream barcodes into reports, there are no additional products to install. The only requirement is that all machines generating reports need access to the Internet or the server generating the barcodes, which may be installed on an Intranet or the report generator itself, for offline integration IDAutomation recommends the Java Encoder.

The first option covered in this tutorial showcases using one of Oracle's supplied sample XML pages for easy follow-along. The second option displays how to create a GS1 Digital Link QR-Code using multiple fields. The third option is a simple way to replace a placeholder image with hardcoded data that generates a QR Code.

Multiple barcode symbologies are provided by the service, including Code 128, Code 39, GS1 DataBar, USPS Intelligent Mail IMb, UPC, Data Matrix, PDF417, QR-Code, GS1 QR-Code, GS1 Digital Link and more.

BI Publisher Tutorial

Option 1: Use the full URL with the field data.

  1. Load the XML Balance sheet provided by the Oracles Sample, typically found in "C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\samples\RTF templates\Balance Letter\Balance.xml"
  2. Using the Table Wizard insert a field, the TRX_NUMBER field is utilized here.
  3. Double click the TRX_NUMBER.
  4. Add the code below. Make sure the barcode parameters, such as X=0.09, come BEFORE the 'D=' as the field needs to be the encoded data.
  5. Preview the PDF or HTML to see the barcodes final generation.

The Code:

<fo:external-graphic src="url('{concat('https://www.bcgen.com/demo/IDAutomationStreamingQRCode.aspx?X=0.09&D=',TRX_NUMBER)}')"/>

Visual of the field when double clicked with the BI Publisher properties code pop-up:

Visual in BI Publisher of what the code behind the TRX_NUMBER field looks like in order to generate a QR Code.

Visual of the QR Codes dynamically generated for the TRX_NUMBER Field:

Dynamic QR Code generation of the TRX_NUMBER field

Option 2: Create A GS1 Digital Link QR Code Using Multiple Fields:

  1. Edit the XML Balance sheet to include a tag for the Streaming Service URL and save. Make sure that any barcode parameters, come BEFORE the 'D=' as the field needs to be the encoded data. This tutorial uses the empty tag <QR></QR> to showcase the QR Code.
  2. Load the GS1 Data into the document and add the field using the Table Wizard.
  3. Insert the below code. Ensure the data is grouped together and seperated appropriately. Double click the QR Code field and under 'advanced' edit the code, or edit the QR Code tag utilzing the field browser tool.
  4. Save and preview the HTML or PDF to see the QR-Code generated.

The Code:

<fo:external-graphic src="url('{concat('https://www.bcgen.com/demo/IDAutomationStreamingQRCode.aspx?X=0.09&D=', DIGITAL_LINK, GTIN, LOT_NUMBER, SERIAL_NUMBER)}')"/>

Visual of the URL with the IDA tag in the XML Data:

An example of what the GS1 Digital Link XML Data in Notepad++ can appear as

Visual of the field when double clicked with the BI Publisher properties code pop-up:

The code of what is behind the QR Code, one could either edit the QR column by double-clicking or editing the field browser tool

QR Code generated in the preview:

An example displaying the table and the final generation of the QR Code with all of the fields combined.


Option 3: Hardcoding the QR Codes in a placeholder image. In the event there is no need to generate barcodes dynamically, consider the following implementation.

Screenshot showing instructions on how to set a placeholder image's alt text in Microsoft Word. The process involves choosing the image, editing its alt text, and adding a URL.

Step 1: Insert a Placeholder Image

  • Open Microsoft Word and navigate to the RTf template for BI Publisher. BI Publisher must be loaded with data in order for this to successfully generate barcodes.
  • Insert a placeholder image into the document, the barcode will render where this placeholder image sits when previewed or exported.

Step 2: Edit the Alt Text of the Image

  • Click on the placeholder image, find the 'Picture Format' tab in the top ribbon, and select the 'Alt Text' option, or right-click the image and select 'Edit Alt Text'.
  • Within the Alt Text box, place the following URL:
url:{"https://www.bcgen.com/demo/IDAutomationStreamingQRCode.aspx?D=IDAutomationDemo&X=0.9"}
  • Replace IDAutomationDemo with the preferred data to be encoded.
  • The parameter X=0.09 defines the size of the QR code. Adjust as needed, the parameters can come in any order for hardcoding.

Step 3: Save and Export the Template

  • Save the RTF Template in BI Publisher.
  • Preview the document or export it to its final form.
  • The placeholder image should now be replaced by the barcode from the external service.

When streaming barcodes on extensive reports, latency may cause a slight slow-down in report generation. If the issue is still experienced, consider implementing one of the products listed below on your intranet, or on the report generator itself to reduce latency: