All posts · BI Reports

BI Publisher Sub-Templates: Reusable Report Components

Sub-templates let you define common layout elements once and reuse them across multiple reports — headers, footers, common sections, and conditional blocks.

Anurag Jangra · February 14, 2026 · 5 min read · ... views

What sub-templates are

A sub-template is a reusable layout component stored as a separate file in the BIP catalog. Other report templates call it by reference. When you need to update the company logo or standard header, you change the sub-template — all reports that use it get the update automatically.

Creating a sub-template

A sub-template is a .rtf or .xsl file saved in the BIP catalog with the object type “Sub Template”. It contains named sections:

In RTF, define a named section between bookmarks:

  • <?template:common_header?>
  • [header content]
  • <?end template?>

Calling a sub-template from a main template

In your main RTF template, reference the sub-template:

<?import:xdoxsl:///Shared Folders/Custom/Templates/common_header.xsl?>

Then invoke the named section:

<?call-template:common_header?>

The sub-template’s content renders at that position in the main template.

Common use cases

Company letterhead: logo, address, registration number — shared across all customer-facing reports (invoices, POs, statements).

Standard footer: page numbers, confidentiality notice, print timestamp — used on all internal reports.

Conditional approval stamp: a “DRAFT” watermark or “APPROVED” stamp that appears based on document status — reused across any document that needs it.

Table header row: column headers with consistent styling — applied to any report containing a tabular section.

Dynamic sub-template selection

Choose which sub-template to use at runtime based on data:

<?if:COUNTRY='UK'?>
  <?import:xdoxsl:///...UK_header.xsl?>
  <?call-template:uk_header?>
<?else?>
  <?import:xdoxsl:///...global_header.xsl?>
  <?call-template:global_header?>
<?end if?>

This allows region-specific letterheads from a single report.

Version management

When updating a shared sub-template, test by running all dependent reports in a test BIP environment first. A broken sub-template breaks every report that uses it simultaneously — unlike changes to individual report templates.

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