1644573 - How to clear a report that appears in the Crystal Report Viewer so that no report is shown?

SAP Knowledge Base Article - Public

1644573 - How to clear a report that appears in the Crystal Report Viewer so that no report is shown?

Symptom

Environment

  • Crystal Reports for Visual Studio 2010
  • VS2010

Resolution

  • The following code will clear the viewer so that no report will show

C#

myReport.ReportClientDocument.Close();
crystalReportViewer1.ReportSource = null;
crystalReportViewer1.Refresh();

VB

myReport.ReportClientDocument.Close()
crystalReportViewer1.ReportSource = Nothing
crystalReportViewer1.Refresh()

Keywords

empty crystalreportviewer1 remove , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports, developer version for Microsoft Visual Studio