cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Is this a WPF project?

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

This's a project using Windows Forms alone.

former_member183750
Active Contributor
0 Kudos

Back to this:

While i have more than 10 images

How many more?

The report engine is not very good at processing large number of images. You can try to minimize the size of the images, the quality, get more CPU, etc., but that is about it. Reason I asked about WPF is because the WPF viewer is even worse at handling images.

- Ludek

Answers (0)