This topic describes how to create and implement style templates. A style template is an RTF template that contains style information that can be applied to other RTF layouts to achieve a consistent look and feel across your enterprise reports.
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
Use style template to define paragraph and heading styles, table styles, and header and footer content.
The styles of the following elements can be defined in the style template:
Paragraph and Heading Styles
You can create a paragraph style in a style template. When this same named style is used in a report layout, the report layout inherits the following from the style template definition: font family, font size, font weight (normal, bold), font style (normal, italic), font color, and text decoration (underline, overline, or strike through).
Table Styles
Following are some of the style elements inherited from the table style definition: font style, border style, gridline definition, shading, and text alignment.
Header and Footer Content
The header and footer regions of the style template are applied to the report layout. This includes images, dates, page numbers, and any other text-based content. If the report layout also includes header and footer content, then it's overwritten.
Following this process for creating style templates helps ensure consistency across documents.
Design Time
For the Style Template:
Open Microsoft Word.
Define named styles for paragraphs, tables, headings, and static header and footer content. This is the style template.
Save this document as a .rtf file.
To ensure that you do not lose custom styles in Microsoft Word, also save the document as a Word Template file (.dot) or save the styles to the Normal.dot file. This file can be shared with other report designers.
Upload the RTF style template file to the catalog.
For the layout template using the style template:
Runtime
When you run the report with the selected layout, BI Publisher applies the styles, header, and footer from the style template.
These sections describe how to define the style types in the Microsoft Word document.
For more complete information see the Microsoft Word documentation.
Use a paragraph style to define formatting such as font type, size, color, text positioning and spacing. A paragraph style can be applied to one or more paragraphs. Use a paragraph style to format headings and titles in the report as well.
In the Microsoft Word document, from the Format menu, select Styles and Formatting.
From the Styles and Formatting task pane, select New Style.
In the New Style dialog, enter a name for the style. Select style type: Paragraph. Format the style using the options presented in the dialog. To see additional paragraph options (such as font color and text effects), click Format.
When finished, click OK and the new style is displayed in the list of available formats in the Styles and Formatting task pane.
Select the new style and make an entry in the style template to display the style.
Position the cursor within the paragraph (or text) to which you want to apply the style.
Select the style from the list of available formats in the Styles and Formatting task pane. The style is applied to the paragraph.
In the Microsoft Word document, from the Format menu, select Styles and Formatting.
From the Styles and Formatting task pane, select and right-click the style to modify.
From the menu, select Modify.
Position the cursor on the text to which you want to apply the heading style.
Select the heading style from the list of available formats in the Styles and Formatting task pane. The selected heading styles are applied to the report output. For example, in the HTML report, Heading 1 through Heading 6 styles use H1, H2, H3, H4, H5, and H6 tags respectively.
Follow these steps to define styles for tables.
In the Microsoft Word document, from the Format menu, select Styles and Formatting.
From the Styles and Formatting task pane, select New Style.
In the New Style dialog, enter a name for the style. Choose style type: Table. Format the style using the options presented in the dialog. To see additional table options (such as Table Properties and Borders and Shading), click Format.
When finished, click OK and the new style is displayed in the list of available formats in the Styles and Formatting task pane.
Choose the new style and make an entry in the style template to display the style.
Position the cursor within the table to which you want to apply the style.
Select the table style from list of available formats in the Styles and Formatting task pane. The style is applied to the table.
You can define a header and footer in the style template. The contents and sizing of the header and footer in the style template are applied to the report layouts.
Note:
If a header and footer have been defined in the report layout, then they are overwritten. The header and footer from the style template are applied.
To define a header and footer:
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:
Follow these steps to assign a style template to a report layout.
The following figure highlights the actions required to enable a style template in the Report Editor.
You can alter a style template after it has been saved.
To update or edit a saved style template:
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.
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 the following figure:
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.