Sub Templates in Oracle BI Publisher
OVERVIEW
Oracle BI Publisher supports several layout template types, e.g. RTF, PDF, XSL,
excel, Flex, eText etc. The RTF template is the most common layout template type
for a variety of document requirements. Sub template is a feature in RTF template
that allows re-use of code, simplification of layout design and reduced maintenance.
This feature is supported in E-Business Suite where you can upload sub template
from Template Manager. On Enterprise Server, this feature can be used, however
there is no user interface to upload and manage sub template. This whitepaper
introduces the sub template feature and explains how to use it in the Enterprise
Server.
Sub Templates can be used to replace Sub
Reports of Crystal Reports. Both non-
linked and linked sub reports can be
replaced by Sub Templates in BI Publisher.
However, Crystal Reports generally
creates a relationship between the main
report and a sub report using related or
unrelated data and such a relationship can
be better handled in the Data Definition
layer of BI Publisher to improve report
performance.
INTRODUCTION
A sub template 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 an RTF file format or an XSL file
format. RTF sub templates are easy to design as you can use Microsoft Word native
features. XSL sub templates can be used for complex layout and data requirements.
RTF SUB TEMPLATE
An RTF sub template consists of one or more <?template?> definitions. Following
are the steps to apply RTF sub template to an RTF template.
1. Define RTF Sub Template
Open an RTF file. Use the following syntax to create a template:
<?template:templateName?>My Hello World !!<?end
template?>
If more templates are required, they all can be defined the same way in the
same RTF file. Sequence of template definition in sub template file does not
matter.
2. Call RTF Sub Template
Sub Templates in Oracle BI Publisher Page 3