I am working on a c# windows forms app in Visual Studio 2005 that dynamically generates reports that contain text and images. There is a main report and several subreports that may or may not be displayed based on user preferences. Each report is displayed on a form using the CrystalReportViewer control.
What I'm finding is that each time I display a report it uses enormous amounts of memory and when I unload the form it doesn't give the memory back. After I've displayed several reports I finally will get an exception:
Exception:Could not load reportSystem.Exception: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80041004): Not enough memory for operation.
Any suggestions on how to force crystal to give back all the memory would be greatly appreciated.