Glossary Item Box

Samples | Walkthroughs

See Also ActiveReports for .NET 2 Online Help Send feedback to Data Dynamics

Walkthrough: Style Sheets

ActiveReports adds style class names to allow controls to be formatted easily. With the use of style sheets, groups of controls can be set to a single style with just a few clicks. ClassName and the different controls' Style property can also be used to create specialized styles in code and through scripting.

This walkthrough illustrates how to create and use style sheets in a  report.

This walkthrough is split up into the following activities: 

Opening an existing ActiveReport

To open an existing ActiveReport  

  1. Click Open > Project.
  2. Select your ActiveReport project from the appropriate location and click on it to select it.
  3. Click Open.

Creating Style Sheets

To create a style sheet

  1. Click anywhere on the report design surface to select it.
  2. Click on Report > Settings...
  3. Click on Styles to display the style sheet.
  4. Select New to add a new style, or select a predefined style to modify.
  5. Name the new style "MyNewStyle" and select a base style.
  6. Modify the properties to set up the desired effect and click OK.

Using Created Style Sheets in a Report at Design Time

To use a created style sheet at design time

  1. Click on the control to which you wish to apply the style.
  2. Select "MyNewStyle" from the style sheets drop-down box.
  3. The new style is applied to your selected control.

Using Created Style Sheets in a Report at Run Time

To write the code in Visual Basic

To write the code in C#

Viewing the report

To view the report

  1. Add the ActiveReports viewer control to a Windows Form.
  2. Add the code needed to set the viewer document equal to the report document. See Using the ActiveReports WinForm Viewer for help.

Samples | Walkthroughs

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.