<< Click to Display Table of Contents >> Navigation: Report Internals > Appearance > Style Designer > Creating Collection of Styles |
A collection of styles is a group of styles that are united by some criteria. The collection should contain at least one style. For example, if the styles are simultaneously used in the current report, they can be united into a collection. It should be noted that the report can have several collections of styles. But the current collection that is applied to the report can be only one collection.
You can create a collection of styles with the following options:
Manually, by filling the Collection Name style property;
Select the Create Style Collection command from the Actions menu, define the settings for the future collection, and click the OK button. In this case, the collection will be generated automatically.
It should be noted that, at the same time, there can be collections of styles created manually and generated in the automatic mode. Also, if necessary, the generated collection of styles, and all the styles in it, can be edited.
Creating a collection of styles manually
Step1. Run the Style Designer
Step 2. Create styles from the Add Style menu or open a previously saved file with styles;
Step 3. Fill the Collection Name property. The value of this property is the name of the future collection. For example, if you specify the name Black for five styles then, in the list of elements of the style designer, the collection with the name Black will be created. It will contain those five styles. When working with collections of styles, please note:
If you drag a style from one collection to another, the value of the Collection name property will change.
When you rename a collection of styles the value of the Collection name property will be changed for all styles in this collection.
To ensure that the style does not belong to any collection of styles, you should delete the value of the Collection name property.
Step 4. Configure the style conditions. Without conditions, when you apply a collection of styles to a report, the styles will be applied sequentially from top to bottom. As a result, the last style from the collection will be applied to the report. However, you can also change the style of the report component by choosing it in the report template and selecting the appropriate style from the style menu on the Home tab of the report designer.
Step 5. Set the style settings (brush, color, borders, alignment, etc.).
Step 6. Click the OK button in the style designer.
Creating a generated collection of styles
Step1. Run the Style Designer.
Step 2. Select the Create Style Collection command from the Actions menu or the context menu of the style designer;
Step3. Set the parameters of the future collection of styles.
The Collection Name field is used to specify the name of the collection.
The Color field is used to select the main color for the style collection.
In the Nested Level field is used to select the value corresponding to the level of nesting in the report.
The Nested Factor field is used to specify the nesting factor that affects the clarity of colors in this collection of styles.
Enables or disables Borders for styles in the collection.
The Remove Existing Styles option. If this option is enabled (check box is selected) then, when creating the collection, existing styles and collections in the style designer will be deleted. If this option is disabled (the check box is cleared), a new collection of styles will be added to existing styles and collections.
The Component panel. In this panel, the bands of the report are checked. If a certain band is checked, then for the report components that are located on it, the styles will be applied. If no bands are checked, the collection will not be created.
The Preview panel. This panel previews a report with the collection of styles applied.
Step 4. Click the OK button in the Create Styles Collection dialog.
Step 5. Edit the styles from the collection, if necessary, and click the OK button in the style designer.
Applying a collection of styles in reports
Once the collections are created, you can select one of these collections in the report. To do this, click Select Style on the Home tab of the report designer. The drop-down list displays all report collections and lists of styles.
After selecting a collection, a message will be displayed. You need to confirm or cancel this action.
When you click Yes, the styles from the collection will be applied to the report components depending on the specified conditions in these styles.