ReportDocument.Load Method
Loads a new report and sets the OpenReportMethod enumeration. If a report is already loaded, then it is closed and a new one is opened.
Overload List
| Description | |
|---|---|
| ReportDocument.Load Method (String,CrystalDecisions.Shared.OpenReportMethod) | Loads a new report and sets the OpenReportMethod enumeration. If a report is already loaded, then it is closed and a new one is opened. |
| ReportDocument.Load Method (String) | Loads a new report. If a report is already loaded, then it is closed and a new one is opened. |
Example
This example loads and previews the report. The report file is opened as a temporary copy.
'Declaration
Private Sub LoadReport(ByVal reportName As String)
Dim myReportDocument As New ReportDocument()
myReportDocument.Load(reportName, OpenReportMethod.OpenReportByTempCopy)
MyCrystalReportViewer.ReportSource = myReportDocument
End Sub
private void LoadReport(String* reportName)
{
ReportDocument * reportDocument = new ReportDocument();
reportDocument->Load
(reportName,OpenReportMethod::OpenReportByTempCopy);
crystalReportViewer->ReportSource = reportDocument;
};
private void LoadReport(string reportName)
{
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(reportName,
OpenReportMethod.OpenReportByTempCopy);
crystalReportViewer.ReportSource = reportDocument;
}
See Also
Reference
ReportDocument Class
ReportDocument Members
CrystalDecisions.CrystalReports.Engine Namespace