ActiveReports 13
Style Sheets
ActiveReports 13 > ActiveReports User Guide > Samples and Walkthroughs > Samples > API > Section Reports > Style Sheets

This sample demonstrates how you can change styles at run time to provide a different look to a same report. The project includes two reports, three report styles and a form containing the ActiveReports Viewer control and other controls that allow you to select any combination of styles and reports.

Sample Location

Visual Basic.NET

<User Folder>\Documents\GrapeCity Samples\ActiveReports 13\API\Section\Stylesheets\VB.NET

C#

<User Folder>\Documents\GrapeCity Samples\ActiveReports 13\API\Section\Stylesheets\C#

Details

Choose Report
Choose between the type of report, Categories and Product List, you want to display in the Viewer control.

Choose Style
Choose between Classic, Colored and External style sheet options to apply the style to the selected report.
Clicking the Choose button option for External style sheet displays the Open dialog that shows only *.reportstyle files, and passes the selected reportstyle path and file name string to the externalStyleSheet variable.

Run Report button
Click this button to display the selected report with the applied style in a Viewer control. Clicking this button creates an SectionReport object, assigns the selected report to it, and assigns a path and file name string to the styleSheet variable. It then assigns the style sheet to the report using the LoadStyles(styleSheet) method, runs the report, and displays it in the viewer.

The sample consists of:

See Also

How To