Skip to Content
0
Former Member
Sep 25, 2012 at 01:08 PM

Crystal Report Windows Form Viewer : Memory Full error, while loading images in reports

134 Views

Hi ,

I'm trying to load images, from my machine local path into crystal report and show the report.

While i have more than 10 images to show and navigate through the report, i get memory full exception.

All my images are resized to size around 200 -250KB with resolution less than 1500 *1500.

The report loads properly but, cannot navigate through due to memory full.

The log shows error:

Details : Out of memory.

StackTrace : at System.Drawing.Graphics.CheckErrorStatus(Int32 status)

at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Rectangle srcRect, GraphicsUnit srcUnit)

at CrystalDecisions.Windows.Forms.PageControl.OnPaint(PaintEventArgs e)

The rpt object is not able to release memory properly after this error is thrown and hence re-running the report also goes wrong.

I'm using VS2010 with CR Runtime SP4 Version on a Win-XP machine.

I had tried with disposing the bitmap image objects after save and also the rpt objects properly after the report is closed.

Would like to know, your suggestions on this, on how could the memory usage can be done more efficeintly using crystal report

and specifically while drawing bitmap images to a report.

Thanks in advance,

Neena M