cancel
Showing results for 
Search instead for 
Did you mean: 

Out of Memory Exception when printing Crystal Report in C#.NET Web Service

Former Member
0 Kudos

I am receiving an out of memory exception while trying to print a crystal report. The report has about 10 barcodes on it and it will print about 1 in every 50 attempts. The error I am receiving is below:

Out of memory. -    at System.Drawing.Graphics.CheckErrorStatus(Int32 status)

   at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)

   at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, Single x, Single y, StringFormat format)

   at CrystalDecisions.Shared.PageRender.draw_FieldObjectInstance(FieldObjectInstance fieldObject, Graphics g)

   at CrystalDecisions.Shared.PageRender.draw_ReportObjectInstance(ReportObjectInstance instance, Graphics g, Rectangle clipRect)

   at CrystalDecisions.Shared.PageRender.draw_SectionInstance(SectionInstance section, Graphics g, Rectangle clipRect)

   at CrystalDecisions.Shared.PageRender.Render(PageObject page, Graphics g, Graphics device_g)

   at CrystalDecisions.Shared.PrintingHelper.PrintPage(PrintPageEventArgs e, PageObject page, PrintLayoutSettings layoutSettings, Int32& currentPageNumber, Int32& currentHorizontalPageNumber)

   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintPageEventHandler(Object sender, PrintPageEventArgs 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(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)

I am running SP14. I was able to move to a different web server running SP5 and it will print fine.

Has anybody else had this issue? And is it a known issue? I read that KB3078601 Windows update could cause it, but I have uninstalled and am still experiencing this issue.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Seems MS broke something with a patch that was applied....

See this thread for more info:

Don

PS - please search before posting....

Former Member
0 Kudos

I am well aware of the issue with the MS KB and I acknowledged it in my post. However, I am running on a different server with the referenced KB installed and running SP5 instead of SP14 and am not having any issues.

0 Kudos

Interesting. I know DEV has made changes for some formatting bugs that were discovered so likely we are using some different method within those dll's.

R&D is aware but busy right now with other updates, once those are done the will be looking into it. I just need to get as much info as I can before escalating.

Good to know SP 5 worked and SP 14 does not.....

Don

0 Kudos

FYI, MS release an updated KBA to fix this font permission issue.

Answers (0)