Memory full.Not enough memory for operation.

I'm receiving an exception indicating memory full. I'm running 2GB physical memory with 4GB pagefile, plenty of disk space. The process runs up to about 1.1GB before crashing and reporting this error. Here is the full stack trace:

at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetPage(PageRequestContext pPageRequestContext)

at CrystalDecisions.ReportSource.EromReportSourceBase.GetPage(PageRequestContext pageReqContext)

at CrystalDecisions.CrystalReports.Engine.FormatEngine.QueryPageSettingsEventHandler(Object sender, QueryPageSettingsEventArgs e)

at System.Drawing.Printing.PrintDocument.OnQueryPageSettings(QueryPageSettingsEventArgs e)

at System.Drawing.Printing.PrintDocument._OnQueryPageSettings(QueryPageSettingsEventArgs e)

at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)

at System.Drawing.Printing.PrintController.Print(PrintDocument document)

at System.Drawing.Printing.PrintDocument.Print()

at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

The report contains 3 images per page over 3 pages (9 images total). Each image is JPG stored in a SQL Server image field. Resolution is 3000x2000 scaled down to fit 3 per page.

Using CR2008SP2 on Windows 2003 Server.

The report is also incredibly slow to run.

Any suggestions?


Hello, Grant;

The designer and an application do use different functionality to run the report. The export driver used (crxf_pdf.dll) is the same if both the Development system and the Crystal Reports designer have the same updates applied.

Is this a Web application? Is the printer driver for the PDF printer locally installed on the application server and visible to the application?

One thing that is the same, the report reads the printer driver to format the report. If the same driver is not visible at runtime it may change format or fail to print to that printer. It will use the default settings of the default printer on the runtime system in that case.

As a test, open the report in the Crystal Reports designer, go to File|Page to check "Setup Disassociate Formatting Page Size and Printer Paper Size".

Save the report.

Can you export it to PDF from the designer now?

It is important to make sure that is working before continuing with your application. It may be there are issues with exporting using Crystal Reports 2008 SP2. I recommend discussing that with the Report Design team as they would be aware of any issues. You can post the Crystal Reports designer export issue to the [Report Design forum|;.

Opening an incident with them would allow them to test your report with saved data and advise you specifically on the issue.

The Developer Support team would also be able to use more in depth tools to narrow down the issue as it may be specific to this report.

To eliminate the issue being a real memory issue caused by the number of images in the report, does a simple report with data fields preview, export and print correctly in the designer and at runtime?

I am not seeing any difference in the size of exported files between the application and the designer in my tests here.


0 View this answer in context

Helpful Answer