This chapter describes how to create and implement style templates. It covers the following topics:
A style template is an RTF template that contains style information that can be applied to RTF layouts. The style information in the style template is applied to RTF layouts at runtime to achieve a consistent look and feel across your enterprise reports. You associate a style template to a report layout in the report definition. Using a style template has the following benefits:
Enables the same look and feel across your enterprise reports
Enables same header and footer content, such as company logos, headings, and page numbering
Simplifies changing the elements and styles across all reports
For information on creating RTF style templates, see "Creating and Implementing Style Templates" in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher.
You can place a style template in any folder in the catalog to which you have access. Your organization may have a designated folder for style templates.
To upload a style template file:
On the global header click New and then click Style Template. This launches an untitled Style Template properties page.
From the Templates region, click the Upload toolbar button.
In the Upload Template File dialog (shown in Figure 21-1), use the Browse button to select the Template File. Select rtf as the Type, and select the appropriate Locale, as shown in Figure 21-2. Then click OK.
The style template file is displayed in the Templates region as the locale name that you selected (for example: en_US).
Click Save.
In the Save As dialog choose the catalog folder in which to save the style template. Enter the Name and click Save.
Note: You may only upload one RTF file per locale to a Style Template definition. If you upload additional template files to this Style Template, each file is automatically named as the locale regardless of the name that you give the file before upload. |
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 Adding Translations to a Style Template Definition.
To assign a style template to a report layout:
Navigate to the report in the catalog and click Edit to open the report editor.
From the default thumbnail view, select View a List. In the Layout Region, click the Choose icon to search for and select the style template from the BI Publisher catalog.
For the layout templates that you want to use the style template, select the Apply Style Template box for the template. Note that the box is only enabled for RTF templates.
Figure 21-3 shows the actions required to enable a style template in the Report Editor.
To update or edit a saved style template:
Navigate to the file in the catalog.
Click Edit to open the Style Template properties page.
Delete the existing file.
Upload the edited file, choosing the same locale.
Style templates offer the same support for translations as RTF template files.
You can upload multiple translated RTF files under a single Style Template definition and assign the appropriate locale. These are displayed in the Templates region, as shown in Figure 21-4.
Or you can generate an XLIFF (.xlf) file of the translatable strings, translate the strings, and upload the translated file. These are displayed in the Translations region, as shown in Figure 21-5.
At runtime, the appropriate style template is applied based on the user's account Preference setting for Report Locale for reports viewed online; or, for scheduled reports, based on the user's selection for Report Locale for the scheduled report.
The XLIFF files for style templates can be generated individually, then translated, and uploaded individually. Or, if you perform a catalog translation that includes the style template folders, the strings from the style template files are extracted and included in the larger catalog translation file. When the catalog translation file is uploaded to BI Publisher, the appropriate translations from the catalog file are displayed in the Translations region of the Style Template definition.
For more information on translations, see "Translation Support Overview and Concepts" in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher.