Back to Devexpress

How to: Use Modifiers of BrickGraphics

windowsforms-112-controls-and-libraries-printing-exporting-examples-using-bricks-how-to-use-modifiers-of-brickgraphics.md

latest1.9 KB
Original Source

How to: Use Modifiers of BrickGraphics

  • Jan 15, 2024
  • 3 minutes to read

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.

See Also

How to: Draw a Line Brick