Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Out of Memory - Printing Crystal Reports from Viewer VS2010 .Net 4 CR13.0.7

$
0
0

My test users have recently received the error Out of Memory when printing reports. Here is some information.

 

I have recently upgraded from

development machine: XP Sp3 VS2003 (CR for VS2003) .Net Framework 1.1 to Windows 7 32 bit SP1 VS2010 (CR 13.0.7) .Net Framework 4

production machines are Windows 7 64 bit 4gig+ RAM (CR 32bit 13.0.7 runtime)

 

The application is .NET C# WinForms

 

When doing some testing I have watched my application go from using 150MB to 250MB after the report has loaded in the CR Viewer that's ok but when I print from the viewer to Microsoft XPS Document Printer the memory used by my application spiked at over 1200MB !

The report had an image (only 17Kb) as a watermark on an underlay section but I removed that and the memory spiked at over 900MB.

 

I tested using a PDF print driver and the memory went from 250MB to spiking at 850MB.

 

Out of interest I ran some tests on the old set up XP VS2003 .Net 1.1 and the memory never went over 200MB.

 

I have been careful to design the reports properly, they even do less filtering than previously.

 

The MAX total records would be around 2500 with 600 pages in the report.

 

The database is SQL Server 2008 R2 and I am connecting the reports using ConnectionInfo and integrated security.

 

The reports are being closed and disposed I have code that tells me if even 2 reports are open at the same time

 

Where can I go from here to get the memory used down and stop these errors on the production side?

 

System.OutOfMemoryException: Out of memory.    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)    at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)    at System.Windows.Forms.Control.WmPaint(Message& m)    at System.Windows.Forms.Control.WndProc(Message& m)    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)    at System.Windows.Forms.UserControl.WndProc(Message& m)    at CrystalDecisions.Windows.Forms.PageControl.WndProc(Message& m)    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>