MindFusion.Reporting for Silverlight Programmer's Guide
ReportLayout Class
Remarks See Also
 





Encapsulates the state of a laid out Report object.

Namespace: MindFusion.Reporting.Silverlight
Assembly: MindFusion.Reporting.Silverlight

 Syntax

C#  Copy Code

public sealed class ReportLayout

Visual Basic  Copy Code

Public NotInheritable Class ReportLayout

 Remarks

You cannot instantiate 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 IRenderTarget object by calling the RenderPage method. The orientation and physical size of a page can be obtained through the GetPageOrientation and GetPageSize methods respectively.

 Example

The following example creates a ReportLayout from an existing report and renders its 10th page to a FixedDocument 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 document is a variable identifying existing FixedDocument.

C#  Copy Code

// Layout the report
ReportLayout layout = report1.Layout(new Size(8.5 * 96, 11 * 96),
    new Thickness(0.5 * 96), PageOrientation.Portrait);

// Render the page
layout.RenderPage(9, document);

Visual Basic  Copy Code

' Layout the report
Dim layout As ReportLayout = report1.Layout(New Size(8.5 * 96, 11 * 96), _
    New Thickness(0.5 * 96), PageOrientation.Portrait)

' Render the page
layout.RenderPage(9, document)

 Inheritance Hierarchy

System.Object
    MindFusion.Reporting.Silverlight.ReportLayout

 See Also

ReportLayout Members
MindFusion.Reporting.Silverlight Namespace