Disposing Crystal Viewer

Peter Griffin

New member
Joined
Mar 3, 2005
Messages
1
Programming Experience
Beginner
I created a real simple Crystal Report Viewer. I found that when its in the process of running a report and I close the Form that the viewer is located on, I get the error:

'System.ObjectDisposedException' occurred in system.windows.forms.dll
Additional information: Cannot access a disposed object named "CrystalReportViewer".

I figured the error occurs because the Viewer was disposed while it was still running, but I don't know of a way to verify if the report is still running or to prevent them from closing while it is running.

Is there anyway I can prevent this from happening or catch it before it does? Thanks!
 
Top Bottom