Encapsulates the state of a laid out Report object. To create an instance of this class, call the Layout method of the Report class.
Namespace: MindFusion.Reporting
Assembly: MindFusion.Reporting
C# Copy Code |
---|
public sealed class ReportLayout |
Visual Basic Copy Code |
---|
Public NotInheritable Class ReportLayout |
You cannot instantiate from this class directly. Instead, invoke the Layout method of an existing Report object, which has been previously processed by a call to its Run method. The ReportLayout objects encapsulate the layout of the report, that is, the page split up and the position of individual report items.
Once you obtain a ReportLayout object you can perform several operations on it. The PageCount property returns the total number of pages in the layout. Individual pages can be rendered to an IGraphics object by calling the DrawPage method. The orientation and physical size of a page can be obtained through the GetPageOrientation and GetPageSize methods respectively.
The following example creates a ReportLayout from an existing report and renders its 10th page to a GDI+ Graphics object. The example assumes that report1 is a variable identifying an existing Report, which has been previously processed through a call to its Run method and that graphics is a variable identifying existing GDI+ Graphics.
C# Copy Code |
---|
// Layout the report |
Visual Basic Copy Code |
---|
' Layout the report |
System.Object
MindFusion.Reporting.ReportLayout