ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / LoadDocument Method / LoadDocument(PageDocument) Method

The page report to open in the viewer.

Example

In This Topic
    LoadDocument(PageDocument) Method
    In This Topic
    Load the specified static page report document.
    Syntax
    'Declaration
     
    Public Overloads Sub LoadDocument( _
       ByVal pageDocument As PageDocument _
    ) 
    public void LoadDocument( 
       PageDocument pageDocument
    )

    Parameters

    pageDocument

    The page report to open in the viewer.

    Remarks
    This method enables the Viewer to display the content of a GrapeCity.ActiveReports.Document.PageDocument. The GrapeCity.ActiveReports.Document.PageDocument should be properly initialized and contain the pages that you wish to display. It's important to note that loading a new document will replace any previously loaded document in the Viewer.
    Example
    Here is an example of creating a GrapeCity.ActiveReports.Document.PageDocument and loading it into the Viewer:
    // Assuming 'viewer' is an instance of the Viewer control
    var pageReport = new PageReport();
    pageReport.Load(new FileInfo(@"path/to/report.rdlx"));
    var pageDocument = pageReport.Document;
    viewer.LoadDocument(pageDocument);
    See Also