Store and Restore Style Sheets

<< Click to Display Table of Contents >>

Navigation:  User Interface Reference > Report Designer > Report Designer for WinForms > Create Reports > Styles and Conditional Formatting >

Store and Restore Style Sheets

Interface Elements for Desktop > Report Designer > Report Designer for WinForms > Create Reports > Styles and Conditional Formatting in Reports > Store and Restore Style Sheets

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 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 Understanding Style 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.

img8554

3.In the invoked Styles Editor, use the img8593 button to create new styles. Specify the desired options (e.g., Background Color) for these styles, and click the Save button.

img8555

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

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

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

img8556

The loaded styles will be displayed inside the Styles node of the Report Explorer. These styles cannot be edited in a report, so they are marked as read-only in the Report Explorer and are not displayed in the Styles Editor.

img8557

If you then reset the Style Sheet Path property, all the styles loaded from the style sheet file will be removed.

Another option for obtaining style sheets from an external file is to use the Open button in the Styles Editor. In this case, the loaded style sheets will be stored within a report, and will thus be editable.

To learn how you can assign styles to report elements, refer to the Understanding Style Concepts and Use Odd and Even Styles documents.

Note

Note that the styles loaded from a style sheet file have priority over the styles that 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 become substitutes for their namesakes.

ExpandedCollapsed See Also

Understanding Style Concepts

Use Odd and Even Styles

Conditionally Change a Control's Appearance

Copyright (c) 1998-2016 Developer Express Inc. All rights reserved.

Send Feedback on this topic to DevExpress.