[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamental Concepts
    [Expand]Print Preview
    [Collapse]Using Bricks
      How to: Use Bricks of Different Types
      How to: Use Modifiers of BrickGraphics
      How to: Draw a Line Brick
      How to: Modify Brick Appearance using Styles
      How to: Unite Bricks into a Non-Separable Group
      How to: Insert a Page Break between Two Bricks
      How to: Create a Non-Printable Brick
      How to: Create a Custom Brick Inherited from a Standard Brick
      How to: Create a Custom Brick Implementing the IBrick Interface
    [Expand]Using Printing Links
    [Expand]Page Header and Footer
    [Expand]Printing DevExpress Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Use Modifiers of BrickGraphics

This example demonstrates how to use report modifiers. To get more information on modifiers, refer to the Document Sections topic. We are going to create a sample report containing Detail, DetailHeader and MarginalHeader sections.

  1. Start a new Windows Application project in Visual Studio.NET.
  2. Add the PrintingSystem component to a project.
  3. Initiate report creation.

  4. To create the MarginalHeader section, set the BrickGraphics.Modifier property of the BrickGraphics to MarginalHeader. The following code adds the date, page count and the current page number to the section.

  5. To create a DetailHeader section, set the BrickGraphics.Modifier property of the BrickGraphics to DetailHeader. The following code adds a column caption to the section.

  6. To create a Detail section, set the BrickGraphics.Modifier property of the BrickGraphics to Detail. The following code adds 100 numbered items to the section.

  7. Finish report creation by calling the PrintingSystemBase.End method, and show the Preview form to ensure that everything has been done correctly.

    The resulting report is shown in the following image.


A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E119.

Expanded See Also

Is this topic helpful?​​​​​​​