ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / LoadDocument Method / LoadDocument(Stream,DocumentFormat) Method
The System.IO.Stream to load the report from.
Specify the format of report to be loaded.
Example

In This Topic
    LoadDocument(Stream,DocumentFormat) Method
    In This Topic
    Loads a document from a stream in the specified binary or XML report format.
    Syntax
    'Declaration
     
    Public Overloads Sub LoadDocument( _
       ByVal stream As Stream, _
       ByVal format As DocumentFormat _
    ) 
    public void LoadDocument( 
       Stream stream,
       DocumentFormat format
    )

    Parameters

    stream
    The System.IO.Stream to load the report from.
    format
    Specify the format of report to be loaded.
    Remarks
    This method enables the loading of documents directly from a stream, facilitating scenarios where documents are stored in memory, in a database, or retrieved from a network location, without the need for a physical file on disk. Supported document formats are determined by the GrapeCity.Viewer.Common.DocumentFormat enumeration, which includes options for various types of reports and documents supported by ActiveReports.
    Example
    Here is an example of using the LoadDocument method to load a report from a stream:
    using (var stream = new FileStream("path/to/report.rdlx", FileMode.Open))
    {
        viewer.LoadDocument(stream, GrapeCity.Viewer.Common.DocumentFormat.Rdlx);
    }
    See Also