ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / LoadDocument Method / LoadDocument(SectionDocument) Method
the section document to open in the viewer.
Example

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

    Parameters

    document
    the section document to open in the viewer.
    Remarks
    This method enables the Viewer to display the content of a GrapeCity.ActiveReports.Document.SectionDocument, which is essentially a compiled section report. It's important to note that loading a new document will replace any previously loaded document or report in the Viewer.
    Example
    Here is an example of loading a GrapeCity.ActiveReports.Document.SectionDocument into the Viewer:
    // Assuming 'viewer' is an instance of the Viewer control
    var sectionDocument = new SectionDocument("SectionDocument1");
    sectionDocument.Pages.Add(new Document.Section.Page());
    Viewer.LoadDocument(sectionDocument);
    See Also