ReportDocument.ReportOptions Property
Gets the ReportOptions object.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Overrideable ReadOnly Property ReportOptions As CrystalDecisions.CrystalReports.Engine.ReportOptions
public virtual CrystalDecisions.CrystalReports.Engine.ReportOptions ReportOptions {get;}
Example
This example reloads a report. All saved data is discarded.
'Declaration
Private Sub ReloadReport(ByVal myReportDocument As ReportDocument)
If myReportDocument.IsLoaded = True Then
Dim autoSaveData As Boolean = myReportDocument.ReportOptions.EnableSaveDataWithReport
myReportDocument.EnableEventLog(EventLogLevel.LogEngineErrors)
If autoSaveData = False And myReportDocument.HasSavedData = True Then
MsgBox("Discarding unsaved data in the report")
End If
myReportDocument.Refresh()
myReportDocument.VerifyDatabase()
End If
End Sub
private void ReloadReport(ReportDocument reportDocument)
{
if (reportDocument.IsLoaded)
{
bool autoSaveData = reportDocument.ReportOptions.EnableSaveDataWithReport;
ReportDocument.EnableEventLog(EventLogLevel.LogEngineErrors);
if (!autoSaveData && reportDocument.HasSavedData)
{
MessageBox.Show("Discarding unsaved data in the report");
}
reportDocument.Refresh();
reportDocument.VerifyDatabase();
}
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports for Visual Studio .NET 2002
See Also
Reference
ReportDocument Class
ReportDocument Members
CrystalDecisions.CrystalReports.Engine Namespace