Skip Headers
Oracle® Business Intelligence Publisher
11g Release 1 (11.1.1)
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

Understanding Subtemplates

This chapter describes subtemplates and covers the following topics:

For information on designing RTF and XSL subtemplates, see the section "Creating and Implementing Sub Templates" in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher.

What Is a Subtemplate?

A subtemplate is a piece of formatting functionality that can be defined once and used multiple times within a single layout template or across multiple layout template files. This piece of formatting can be in an RTF file format or an XSL file format. RTF subtemplates are easy to design as you can use Microsoft Word native features. XSL subtemplates can be used for complex layout and data requirements.

Some common uses for subtemplates include:

About RTF Subtemplates

An RTF subtemplate is an RTF file that consists of one or more <?template:?> definitions, each containing a block of formatting or commands.

This RTF file, when uploaded to BI Publisher as a Sub Template object in the Catalog, can be called from within another RTF Template.

About XSL Subtemplates

An XSL subtemplate is an XSL file that contains formatting or processing commands in XSL for the BI Publisher formatting engine to execute. Use an XSL template to include complex calculations or formatting instructions not supported by the RTF standard.

This XSL file, when uploaded to BI Publisher as a Sub Template object in the Catalog, can be called from within an RTF Template.

Creating the Sub Template Object in the Catalog

To upload a subtemplate file:

  1. On the global header click New and then click Sub Template. This launches an untitled Sub Template page.

  2. In the Templates region, click Upload to launch the Upload Template File dialog.

  3. Browse for and select the subtemplate file.

    • Type: Select rtf for RTF subtemplate files or xsl for XSL subtemplate files.

    • Locale: Select the appropriate locale for the subtemplate file.

  4. Click Upload.

    The subtemplate file is displayed in the Templates region as the locale name that you selected (for example: en_US).

  5. Click Save. In the Save As dialog choose the catalog folder in which to save the Sub Template. Enter the Name and click Save. Figure 20-1 shows a Sub Template named "My Subtemplate".

    Figure 20-1 Sub Template

    Surrounding text describes Figure 20-1 .
  6. (RTF Sub Templates only) If you are uploading multiple localized files, then select the file that is to be used as the default.

    For more information on localization of template files, see "Designing RTF Subtemplate Files" in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher.


    Note:

    You may upload only one RTF file per locale to a Sub Template definition. If you upload additional template files to this Sub Template, each file is automatically named as the locale regardless of the name that you give the file before upload.



    Important:

    Translations are not supported for XSL Sub Templates.


Note that the Sub Template object is saved with the extension ".xsb". You use the Name that you choose here with the .xsb extension when you import the Sub Template object (for example: MySubtemplate.xsb).