Each report element ( bandand control) and the reportitself has a group of properties, specifying the element's appearance, such as Background Color, Borders, Border Color, Border Width, Font, Foreground Color, Paddingand Text Alignment. By default, these properties are set to empty values, which means that their real values are obtained from a control's (or band's) parent. In turn, this means that these appearance-related properties, defined by a parent, are spread to their child elements.
You can also define a control's appearance properties independently from its parent.
When it is required to reset a value assigned to a control's appearance property, you can right-click this property in the Property Grid, and in the invoked menu, click Reset. So, the control will be restored to the appearance of its parent.
Note |
---|
Some of these properties are only applicable to certain controls. For example, the Linecontrol ignores the Text Alignmentproperty, assigned to the Line's container band. |
Additionally, there can be stylescreated in a report. A report's styles live in the report's Style Sheetcollection. A style stored within this collection has a set of the same appearance properties, as a control or a band has. There are two ways to store a report's style sheets. The first approach is to save them to external files (with REPSS extension), and then load them to a report using its Style Sheet Pathproperty in the read-only mode (this is described at Store and Restore Style Sheets). The second is to store the style sheets within the report (using the Style Sheetproperty), so that they can be modified, if required, and saved with the report itself.
Finally, the styles can be assigned to a report's bands and controls. So, there is an option for the band or control to obtain its appearance either from a style assigned to it, or from the control's own appearance properties. In this case, the control's Style Priorityproperty allows you to define the required behavior of the control's final appearance.
By default, all the Style Priority's options ( Style Priority.Use Background Color, Style Priority.Use Border Color, etc.), which follow the structure of the style and appearance properties, are set to Yes(except the Use Text Alignment). This means that if any style is assigned to a control via its Stylesproperty, 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, rather than its style, set the corresponding Use*property to No.
Note |
---|
If styles contained in a style sheet loaded in the Style Sheet Pathproperty have the same names as styles already contained in a report, the latter ones are overriden. |
The following image demonstrates how the Style Priorityproperty works.
Note |
---|
When a conditional formattingis involved, the appearance defined by the conditional formatting has a higher priority than the properties described above. |
Another commonly used feature is odd-even styles. It allows you to visually delimit alternating data fields in a report, for better readability. More information about this can be found at Use Odd and Even Styles.