cancel
Showing results for 
Search instead for 
Did you mean: 

Memory full.Not enough memory for operation.

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello, Grant;

How quickly does this report display in the Crystal Reports designer?

Can you page to the last page successfully and then print to the same printer as you do at runtime with no errors?

Crystal Reports sends the completed report to the printer and some printers may not have enough on board memory to handle a report with large images. Do you get the same problem if you choose a different printer or if you export the report to PDF or view in a viewer at runtime?

What version of Visual Studio .NET are you using? Did you reference the Crystal Reports 2008 (12.0 or 12.1) .dlls in your application?

Do you have a Temp directory set in your Environment variables? Is it clear or full of files?

Elaine

Former Member
0 Kudos

Hi Elaine,

> How quickly does this report display in the Crystal Reports designer?

Less than a second in Preview.

> Can you page to the last page successfully and then print to the same printer as you do at runtime with no errors?

Yes. Last page works. Printing also works.

> Do you get the same problem if you choose a different printer or if you export the report to PDF or view in a viewer at runtime?

If I export to PDF via Crystal Designer I get a "Memory full" error.

The printer I'm using is a PDF Printer (Bullzip PDF) so memory shouldn't be a problem. We were originally using Crystal's Export to PDF but the file sizes were insanely large and unacceptable (eg. 14MB PDF by Crystal PDF Export versus printing to a PDF printer 500KB).

Printing to Bullzip PDF printer via the Designer works ok.

> What version of Visual Studio .NET are you using? Did you reference the Crystal Reports 2008 (12.0 or 12.1) .dlls in your application?

VS2005 with Crystal Report 12.2

> Do you have a Temp directory set in your Environment variables? Is it clear or full of files?

Mostly empty using C:\WINDOWS\TEMP The process is running as Local System so security shouldn't be an issue either. This is a development machine.

These tests suggest that Print to Printer is different between the Designer and SDK.

Regards, Grant.

Former Member
0 Kudos

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.

Elaine

Former Member
0 Kudos

Hi Elaine,

> 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.

The explains why both Designer and API crash when Exporting to PDF.

The differences in Designer and API might explain why printing to a 3rd party PDF works in Designer but fails in the API.

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

It's a web service that encapsulates the single process of creating PDF's. The PDF printer is installed locally. The web service is given Local System rights as ultimately it will run standalone and isolated from the rest of the system.

> 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?

I did as suggested but same problem. I also selected "No Printer" in a separate test. In all scenarios when Exporting to PDF, the report runs, identifies 9 records, gets 77% through (7th record on page 3) then reports reported failed with Memory full.

> 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.

Thanks. I'll do that.

> 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?

Exporting and printing both work fine with other templates with text and a small image or two (usually logos).

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

The difference isn't size between Designer and API, it's between Exporting to PDF versus using a 3rd party PDF printer. I performed a test using 3 images (which works without memory full error):

CR 2008 Export to PDF 110 seconds to generate 24MB PDF

CR 2008 Print to Bullzip PDF 17s to generate 580KB PDF

Both tests were performed via the Designer. With the Print To scenario, CR returns after 1 second and the print driver takes a further 16 seconds to render the PDF. We switched to the PDF Printer for both size and performance reasons.

Thanks for your help, I'll move this over to the Designer forum as you suggested.

Regards, Grant.

Former Member
0 Kudos

Ummm.... Sorry, not sure what happened to my formatting! It edits correctly but isn't displaying correctly! Looks like CR2008 isn't the only SAP product with problems!

Answers (0)