I am constantly getting the following error when closing my app if we viewed/printed a report. What do I need to do to correct this error? For the following error, I opened my app, viewed a report on the screen using the 'CrystalReportViewer', closed the report viewer window, closed my app. When closing the app, the following error occurs.
CR version: 11.5.3300.0
VB.NET v2.
System.Runtime.InteropServices.InvalidComObjectException was unhandled
Message="COM object that has been separated from its underlying RCW cannot be used."
Source="mscorlib"
StackTrace:
at System.Runtime.InteropServices.UCOMIConnectionPoint.Unadvise(Int32 dwCookie)
at CrystalDecisions.ReportAppServer.%. {(_ISCDClientDocumentEvents_OnClosedEventHandler u)
at CrystalDecisions.ReportAppServer.%.remove_OnClosed(_ISCDClientDocumentEvents_OnClosedEventHandler value)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.DisconnectEventRelay()
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper. (Boolean \b, Boolean )
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Dispose(Boolean bDisposeManaged)
at System.ComponentModel.Component.Dispose()
at CrystalDecisions.CrystalReports.Engine.ReportDocument. (Boolean :)
at CrystalDecisions.CrystalReports.Engine.ReportDocument. (Boolean ;)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Close()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.
(Object >, EventArgs ?)