Creating themes for a report template
sectionA library can contain any number of themes, and a theme can contain any number of styles. You create themes in a library, then associate the library with a template. Actuate BIRT Designer Professional provides support for the following two types of styles:
*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 In New, in Select a wizard, expand Actuate BIRT, 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 warning message appears, choose OK.
2 Choose Outline view. Outline view, shown in Figure 4‑8, displays the types of report elements you can add to a library.
Figure 4‑8 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, shown in Figure 4‑9, expand Actuate BIRT, and choose Resource.
Figure 4‑9 Specifying the location of the resource folder in Preferences
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 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, shown in Figure 4‑10, right-click Libraries and choose Use Library.
Figure 4‑10 Choosing Use Library in the Outline view
4 In Use Library, expand Shared Resources to display the libraries in the BIRT resource folder. Figure 4‑11 shows an example of Use Library.
Figure 4‑11 Displaying libraries in the resource folder
5 Select the library that contains the themes you want to use with the template, then choose OK.