ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / LoadDocument Method / LoadDocument(PageReport) Method
The GrapeCity.ActiveReports.PageReport instance to be loaded into the Viewer.
Example

LoadDocument(PageReport) Method
Loads the specified GrapeCity.ActiveReports.PageReport into the Viewer control.
Syntax
'Declaration
 
Public Overloads Sub LoadDocument( _
   ByVal pageReport As PageReport _
) 
 

Parameters

pageReport
The GrapeCity.ActiveReports.PageReport instance to be loaded into the Viewer.
Remarks
This method allows the Viewer to display the content of a GrapeCity.ActiveReports.PageReport, which is a report designed in the Page Report format. The GrapeCity.ActiveReports.PageReport encapsulates the report definition along with its data sources, parameters, and layout information. The GrapeCity.ActiveReports.PageReport should be properly initialized with its definition (usually a .rdlx file) and any necessary data connections. It's important to note that loading a new report will replace any previously loaded document or report in the Viewer.
Example
Here is an example of loading a GrapeCity.ActiveReports.PageReport into the Viewer:
// Assuming 'viewer' is an instance of the Viewer control and 'reportPath' is the path to the .rdlx file
PageReport pageReport = new PageReport(new FileInfo(reportPath));
viewer.LoadDocument(pageReport);
See Also