Quantcast
Viewing all articles
Browse latest Browse all 3636

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

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.

 

PrintToPrinter: A generic error occurred in GDI+ everytime

 

Thanks.


Viewing all articles
Browse latest Browse all 3636

Trending Articles