Skip to Content
0
Former Member
Feb 11, 2010 at 03:53 AM

Disposing resources used by crystal reports

206 Views

My company is using crystal reports 10.2 (embedded in VS 2005). Some of reports print images. What we do we convert the images to bytes and then put it in a datatable. Then we pass that datatable to the crystal reports to display the images.

The images displayed are fine., but the problem is it allocates a huge chunks in the memory. To explain further, we loaded five images, when we navigate through in the crystal reports viewer to check the images it add 1mb in the memory. upon loading it adds 1mb in the memory and then when navigating to the next images it adds 1mb again and so on... well it seems understandable because we are loading huge images, but then what we expected is if close the form the used memory should decrease.

In the closes form event of the our form we put this lines of codes:

crystalreportsviewer.dispose();

datatable.dispose();

reportdocument.dispose();

GC.Collect();

But still the memory consumed doesn't diminished

Can you suggest us how to overcome this dilemma?