Back to Devexpress

PrintingSystemBase.Begin() Method

corelibraries-devexpress-dot-xtraprinting-dot-printingsystembase-3c8dc77b.md

latest4.2 KB
Original Source

PrintingSystemBase.Begin() Method

Indicates that report generation has started.

Namespace : DevExpress.XtraPrinting

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public void Begin()
vb
Public Sub Begin

Remarks

This method signals that report generation has started. All bricks created after calling this method are not included in the report until the PrintingSystemBase.End method is called.

Note

The number of PrintingSystemBase.End method calls must equal the number of Begin method calls.

Example

The following code demonstrates how to create a VisualBrick and specify its dimensions and border settings, using the BrickGraphics.DrawRect method:

csharp
using DevExpress.XtraPrinting;
// ...

    VisualBrick visBrick;
    BrickGraphics brickGraph = printingSystem1.Graph;

    // Start the report generation.
    printingSystem1.Begin();

    // Create a rectangle.
    RectangleF rect = new RectangleF(new PointF(0, 0), new SizeF(150, 50));

    // Specify a page area.
    brickGraph.Modifier = BrickModifier.Detail;

    // Add a brick to the report.
    visBrick = brickGraph.DrawRect(rect, BorderSide.All, Color.Yellow, Color.Blue);

    // Finish the report generation.
    printingSystem1.End();

    // Preview the report.
    printingSystem1.PreviewFormEx.Show();
vb
Imports DevExpress.XtraPrinting
' ...

    Dim visBrick As VisualBrick
    Dim brickGraph As BrickGraphics = printingSystem1.Graph

    ' Start the report generation.
    printingSystem1.Begin()

    ' Create a rectangle.
    Dim rect As RectangleF = New RectangleF(New PointF(0, 0), New SizeF(150, 50))

    ' Specify a page area.
    brickGraph.Modifier = BrickModifier.Detail

    ' Add a brick to the report.
    visBrick = brickGraph.DrawRect(rect, BorderSide.All, Color.Yellow, Color.Blue)

    ' Finish the report generation.
    printingSystem1.End()

    ' Preview the report.
    printingSystem1.PreviewFormEx.Show()

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Begin() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-winforms-custom-brick/CS/Form1.cs#L20

csharp
"Developer Express Inc.");
printingSystem1.Begin();
// Specify the page area to draw a brick.

reporting-winforms-custom-brick/VB/Form1.vb#L21

vb
"Developer Express Inc.")
printingSystem1.Begin()
' Specify the page area to draw a brick.

See Also

End

PrintingSystemBase Class

PrintingSystemBase Members

DevExpress.XtraPrinting Namespace