Customizing and integrating BIRT Studio : Creating and publishing report templates : Creating themes for a report template
 
Creating themes for a report template
As described earlier in this section, you create themes to provide the user with different sets of styles to apply to a report. You use Actuate BIRT Designer Professional to create the themes in a library. After you create the library, you associate the library with the template.
A library can contain any number of themes, and a theme can contain any number of styles. Actuate BIRT Designer Professional provides support for two types of styles. You are able to do the following:
*Create a custom style, and apply it to a report element. For example, you can create a style named Report Title, then apply the style to a label that displays the report title.
*Apply style properties to predefined style names, or selectors. These predefined style names correspond to the different types of report elements. For example, you can apply style properties to a predefined style named table-header, and all table headers in the report are formatted accordingly. This technique is similar to defining styles in CSS where you associate styles with HTML elements, such as <H1> or <P>.
How to create a theme
1 Create a library:
1 Choose FileNewOther.
2 On New, expand Business Intelligence and Reporting Tools, then select Library. Choose Next.
3 In New Library, specify the folder in which to create the library, specify a file name, then choose Finish. If a message box appears, choose OK.
2 Choose Outline view. Outline view, shown in Figure 13‑6, displays the types of report elements you can add to a library.
Figure 13‑6 Outline view
3 In Outline view, expand Themes.
4 Right-click defaultTheme, and choose Rename to change the name of the theme.
5 Right-click the theme, and choose New Style to create a style for the theme.
6 On New Style, select one of the following options:
*To apply style properties to a specific type of report element, select Predefined Style, and select a style from the drop-down list.
*To create a user-named style, select Custom Style, and specify a unique descriptive name, such as Report Title or Copyright.
7 Set the desired properties for the style by selecting a property category on the left and specifying property values.
8 When you finish setting style properties, choose OK to save the style.
9 Repeat steps 5 to 8 to create additional styles for the theme.
10 To create a new theme, right-click Themes, and choose New Theme.
How to associate a library with a template
1 If the BIRT resource folder is not the current project folder, place the library in the BIRT resource folder, so that it is available to the template. To specify a folder as the resource folder:
1 Choose WindowPreferences.
2 In Preferences, expand Report Design, then choose Resource, as shown in Figure 13‑7.
3 Choose File System to select a folder to use as the resource folder.
4 On Directory Selection, navigate to a folder on your computer or on the network, or choose Make New Folder to create a new folder.
5 Choose OK to confirm your folder selection. Preferences displays the path to the resource folder.
6 Choose OK to save the resource folder location information, and close the Preferences window.
7 In the layout editor or Navigator, select the library, then choose FileCopy Library to Shared Resource Folder. Share Library displays the library name and the location of the resource folder.
8 Choose Finish to confirm placing a copy of the library in the resource folder.
2 Open the template file, and choose Outline view.
3 In Outline view, right-click Libraries, and choose Use Library, as shown in Figure 13‑8.
Figure 13‑7 Specifying the location of the resource folder in Preferences
Figure 13‑8 Choosing Use Library in the template file’s outline view
4 In Use Library, expand Shared Resources to display the libraries in the BIRT resource folder. Figure 13‑9 shows an example of Use Library.
Figure 13‑9 Displaying libraries in the resource folder
5 Select the library that contains the themes you want to use with the template, then choose OK.