This tutorial describes how you can save a report's style sheet into an external file, and then load it back to the report.

You can store a report's style sheet (containing all the report's styles) in an external REPSS file. This makes it possible to easily restore a report's appearance from this file. For general information, refer to Understand Styles Concepts.

To learn how to store and restore report style sheets, do the following.

  1. Create a new report and bind it to a data source.

  2. Click the report's Smart Tag, and in the invoked actions list, click the ellipsis button for the Style Sheet property.

  3. In the invoked Styles Editor, use the button, to create new styles. For them, specify the desired options (e.g. Background Color), and click the Save button.

    Then, in the invoked Save File dialog, define a name for the style sheet file (.REPSS), and click Save.

  4. Then delete the created styles, using the button, and close the dialog.

  5. Select the report, and in the Property Grid, click its ellipsis button for the Style Sheet Path property. In the invoked Open File dialog, load the created REPSS file.

    When you invoke the Styles Editor (via the report's Style Sheet property) again, you'll see that the styles are read-only, meaning that they are obtained from an external file.

    If the Style Sheet Path property is then set to None, and a style sheet is loaded using the Styles Editor of the Style Sheet property, all these styles will become editable.

To learn how you can assign styles to report elements, refer to Use Odd and Even Styles.

NoteNote

Note that the styles loaded from a style sheet file have priority over the styles which exist in a report's style sheet. So, if the styles stored in the report have the same names as the styles loaded from a style sheet file, then the styles from the file will substitute for their namesakes.

Expand imageSee Also