All posts · BI Reports

Creating RTF Templates for BI Publisher

RTF templates are the most common BI Publisher layout format — here's how to install the Template Builder plugin, use BIP tags, and create professional-looking report layouts.

Anurag Jangra · January 14, 2026 · 7 min read · ... views

The Template Builder for Word

Oracle provides a free Microsoft Word plugin called BI Publisher Template Builder that adds a BIP toolbar to Word. Install it from: My Oracle Support or Oracle Technology Network.

The plugin:

  • Connects to your BI Publisher instance to load data models
  • Provides a field picker to insert BIP tags directly
  • Allows in-Word preview with real sample data

Template structure

An RTF template is a Word document with special BIP tags embedded as field codes. When BIP processes the template, it replaces tags with actual data values.

Basic field insertion

<?EMPLOYEE_NAME?>        -- outputs the value of EMPLOYEE_NAME
<?AMOUNT?> or
<?xdofx:to_char(AMOUNT, '$999,999.00')?>  -- formatted number
<?xdofx:to_char(HIRE_DATE, 'DD-Mon-YYYY')?>  -- formatted date

Repeating rows (table rows)

For each row in the data:

<?for-each:EMPLOYEES?>
  [row in table: <?EMPLOYEE_NAME?> | <?DEPARTMENT?> | <?SALARY?>]
<?end for-each?>

In practice, insert this as table rows in Word with the tags in the appropriate cells.

Conditional content

Show content only when a condition is met:

<?if:STATUS='OVERDUE'?>
  [text or cell that shows only for overdue items]
<?end if?>

Grouping and summaries

Group by a field and show subtotals:

<?for-each-group:DEPARTMENTS;./DEPT_NAME?>
  Department: <?DEPT_NAME?>
  <?for-each:current-group()?>
    [employee row]
  <?end for-each?>
  Subtotal: <?sum(.//SALARY)?>
<?end for-each-group?>

Conditional formatting

Change cell color or font based on data:

<?xdo-xslfo:background-color;'xdofx:if(AMOUNT>10000, "yellow", "white")'?>

Testing templates

In Template Builder: BIP menu → Preview → connect to BIP and preview with real data. This validates tags and shows exactly how the output will look before uploading to the server.

Common mistakes

  • Forgetting to test with null values (empty fields cause tag errors)
  • Hardcoding dates/amounts instead of using format functions
  • Not handling the case where a query returns zero rows (show a “No data found” message using <?if:count(ROWS)=0?>)

Think Beyond the Implementation

Questions worth sitting with after reading this

01

Why is this architecture appropriate for this specific context — and where would it be the wrong choice?

02

What assumptions did we make that aren't stated explicitly? What happens if those assumptions are wrong?

03

What would break first if the requirements changed — volume doubled, a third system was added, or the deadline halved?

04

What alternatives did we reject, and why? Was the decision made on evidence — or habit?

AJ
Anurag Jangra
Oracle Cloud PaaS Consultant · OIC & VBCS Specialist

4.5+ years delivering enterprise Oracle Cloud integrations and VBCS applications across manufacturing, IT services, and financial sectors. OCI Certified — writes about real-world OIC, VBCS, SQL, and BI Publisher patterns from production experience.

Chat on WhatsApp