Visual Styles
This topic describes the main concepts of using styles in Advanced Reports.
Styles and Style Overriding
In addition to the ability to specify Appearance property values for every control or band, it is also possible to create a global style in a report.
To assign a particular style sheet to a control, set its Style property to one of the styles stored in the report's style sheet collection.
A style that is assigned to a band applies to all of the controls that the band contains.
A style defines the same appearance properties that are defined by a control's (or band's) Appearance properties. So, if a certain property is set both in the styles and in the control's own appearance property, a priority is required to decide which of the properties to use. This is what the Style Priority property is intended for.
By default, all the Style Priority's options (Use Background Colour, Use Border Colour, etc.), which follow the structure of the style's and appearance properties, are set to Yes. This means that if any style is assigned to a control via its Styles property, all its properties will have a higher priority than the properties stored in the control or in its parent. If you want some of the properties to be determined by a control (not by its style), set the corresponding property to No.
|
- Drag and drop a label onto detailBand1.
-
Click on the label and change the text to My Label.
- In the Property Grid for the label, set the BackGround Colour to GreenYellow.
- Under the Styles | Style property, select the value for the Background Colour to OrangeRed.
- Set the value of the Style Priority to Use Background Colour. This means that the local style set in the Appearance properties has the higher priority and so the label will appear with a OrangeRed background (see image on the following page).
- Set the value of the Style Priority for BackGround Colour to No. This means that the local style set in the Appearance properties has the lower priority and so the label will appear with a GreenYellow background (see image on the following page).
The following image shows the results from altering the Style Priority property.
If some of a control's appearance properties values are changed, the corresponding property of the Style Priority object is set to No for this control.
When a conditional formatting is involved, the appearance defined by it has a higher priority than the properties described above.