While you can format each objects manually, setting properties such Background Color, Font, and Padding, gets tedious if you have a lot of objects. It also is error-prone; you could forget to set one of the properties for some objects, so they look different than the other objects. It's also hard to make overall changes, such as changing the font for every object from Arial to Tahoma. Instead, use styles.
Like styles in Microsoft Word and other applications, styles in Stonefield Query allow you to define a consistent appearance for certain types of objects. For example, perhaps all objects in the DetailBand should use Tahoma 10pt but objects in the GroupHeader bands should use Tahoma 10pt Bold. This can easily be done by creating two styles and then setting the Style property of each object to the appropriate style. Later if you decide to use a different font, simply change the style and all objects using that style use the new font without having to edit each one manually. Templates use styles extensively for a consistent appearance for all objects.
The styles for a report are organized into a style sheet, which you can edit using the Styles Editor. To access the Styles Editor, click the small button with a down-and-right pointing arrow just below the report's tab at the top of the Layout Area and click the "..." button beside Style Sheet in the Report Tasks dialog that appears.
Stonefield Query automatically creates a style sheet for the report based on the style sheet defined in the template for the report. The styles in this sheet include ColumnHeadingStyle, used for column heading, DetailBandFieldStyle, used for objects in the detail band, and SummaryFieldStyle, used for summary objects such as grand totals. You can edit any of these styles or create new ones if you wish.
To create a new style, click the button in the tool bar. To remove the selected style, click . Click to remove all styles or to remove styles that have been defined but not used by any object. To save styles to or load styles from an REPSS file, click the or buttons.
The properties for a style are:
Name: the name of the style. The name must start with a letter or underscore and can only contain letters, numbers, and underscores.
Background Color: the background color of the object.
Border Color: the color of the object's border. This is only applicable if at least one of the borders appears; see the Borders property.
Border Dash Style: the type of line used for the border: solid, dash, dot, dash-dot, dash-dot-dot, or double. This is only applicable if at least one of the borders appears; see the Borders property.
Border Width: the width of the border
Borders: which borders appear for the object. Click the down arrow to display a border picker where you can choose which borders should display.
Font: the font settings for the object.
Foreground Color: the foreground (text) color of the object.
Padding: the amount of space around the text as a margin. The sub-properties are All (setting this sets all the others to the same value), Bottom, Left, Right, and Top.
Text Alignment: the text alignment of the object. Click the down arrow to display a picker you can select the alignment from.
If you haven't set a property's value, it appears as "(Not set)" and it doesn't affect the property of objects using the style. This allows you, for example, to have a style that just sets the font of objects using the style but not change their borders or colors.
Using a style
To use a style, set an object's Style property to the desired style from the drop-down list. Some objects have three types of styles: Even Style, which is used when the object appears in even-numbered rows, Odd Style, used for odd-numbered rows, and Style, used when Even Style and Odd Style aren't filled in. Even Style and Odd Style allow to create reports where alternating rows have different colors by leaving the Background Color of an even style untouched (meaning it'll be white) and setting it to some color for an odd style.
There may be times when you want an object to use some of the settings of a style but not all of them. To do that, set the appropriate sub-properties of the Style Priority property for the object to No (by default, they're all set to Yes, meaning use the setting of the style property rather than that of the object). For example, to use the object's Font property rather than the style's, set Use Font to No.