Home > ERP, Formatting, Work Life > BI Publisher Subtemplates

BI Publisher Subtemplates

We are using BI Publisher Subtemplates to change our printed PO terms and conditions based on a supplier.  Subtemplates allow us to split the terms content from the formatting template.

I had the toughest time getting this to work; the documentation for subtemplates proved to be a bit rough.  I found a few errors in both the formal BI Publisher documentation and Oracle provided white paper.  Here are the basics for getting BI Publisher subtemplates to work.

 

Subtemplate

Create a new BI Publisher template the same way the main template is configured, but use a different template name/code, and make sure subtemplate is set to “Yes”.

Contents of subtemplate RTF:

<?template:standard_terms?>
Standard Terms Body
<?end template?>
<?template:100001_terms?>
Special Supplier Terms Body
<?end template?>

 

Report Calling the Subtemplate

You must first import the subtemplate file from the main template, then call the section of the file you want to display.


Import the Subtemplate file

When Using Server to Render Output
Syntax:
<?import:xdo://[APPLICATION_CODE].[TEMPLATE_CODE].[LANGUAGE_CODE].[TERRITORY]/?>

<?import:xdo://XXPO.XXPO_TERMS_R100.en.US/?>


When Using Desktop Viewer to Render Output

<?import:file:C:/XXPO_TERMS_EGS_R100.rtf?>


Call the subtemplate with a condition

<?choose:?>
<?when:SUPPLIER_NUMBER=’100001′?>
<?call:100001_terms?>
<?end when?>
<?otherwise:?>
<?call:standard_terms?>
<?end otherwise?>
<?end choose?>

Things to Note

  • Language code is always lower case
  • Territory is always upper case
  • Don’t forget the forward  slash at the end of the server based import string
  • Some formatting in your subtemplate will cause the subtemplate import to fail
    • I couldn’t get the subtemplate to be two columns using built in RTF/Word functionality
    • I did get the main document to put the subtemplate text into two columns
    • Intended bullets and numbering work fine

Oracle Documentation

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: