A very often heard question of customers is; “can we change the header/footer of our reports with this or that…?”. Of course we can change this, but it can be a timespending operation. If you have a couple of reports than it is not a problem to change each report manually, but most organisations have dozens of reports. The magic word for this situation is: subtemplate.
What are subtemplates? Subtemplates are pre-defined templates with a default header, footer and other recurring reporting objects. The most common situation is a default header with a logo, report-header and a page navigation.
Which elements do we declare in a subtemplate:
1. – header: between the start and end-tag we just insert an image, declare a variable and insert the page navigation.
< ?template:Header?> insert your text and/or image < ?end Header?>
2. – footer: In the footer we alse can define just the text or graphics we want. In this example I wrote the company missionstatement.
< ?template:Footer?> insert your text and/or image < ?end Footer?>
Now we have created the subtemplate all our reports should use it. In the template you can refer to defined report-objects in the subtemplate. In this example we can refer to the header and footer. Beside refering to the report-object we have to declare where the subtemplate resides. When generating the report from the server the subtemplate should also reside on the server or a network-drive which the server can access.
The template can call so called inlines from the subtemplate. In this example we call the footer and the header. These statements are made in the actual header of the RTF-template.
In the body of the template we declare where the subtemplate resides. This import statement looks like this:
< ?import: file:///D:OracleBIDatasubTemplate_a4.rtf?>
Be aware of the three forward slashes!
The option “Disable external references” is default disabled for a BI-pubisher report. If you want to make use of the subtemplate this option should be enabled.
When your reports are using subtemplates than the question above is not timespending at all. Just change your logo or some text in the subtemplate and your reports have the new layout!

January 16th, 2008 at 01:29:30
Hi
I have followed your instructions. I am not able to locate “The option “Disable external references””.
Could you please advise where this is setup.
Thanks
Donna
January 16th, 2008 at 10:58:36
Hi Donna,
You can find the option “Disable external references” under the link configure when editing your report. Under the header “FO Processing” you can find the option.
Bastiaan
December 10th, 2008 at 02:05:17
Hi,
Our BI Publisher instance is on Unix.
Could you give an example how the import statement would look like for a Unix directory path?
I can’t seem to get it working on Unix.
Thanks.
June 25th, 2010 at 17:53:58
How to display page numbers in subtemplates.
June 25th, 2010 at 17:54:33
Could anyone please help please