This is a migrated thread and some comments may be shown as answers.

Out of memory

2 Answers 222 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Koen L
Top achievements
Rank 1
Koen L asked on 22 May 2012, 11:46 AM
Hi,

We get this exception while not making big reports. We never make reports bigger then 5 pages.
We do make alot reports. Can the numbers of reports cause this exception?

Or do need to put the ReportProcessor in a using statement?

Piece of our code :

System.Drawing.Printing. 

PrintController standardPrintController = new System.Drawing.Printing.StandardPrintController();  

ReportProcessor reportProcessor = new ReportProcessor();  

reportProcessor.PrintController = standardPrintController; 

reportProcessor.PrintReport(report, printerSettings);

Our exception logging :

---EXCEPTIONS----------

[OutOfMemoryException]
Out of memory.


---STACK TRACE----------

at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at Telerik.Reporting.Processing.ReportPrintDocument.OnPrintPage(PrintPageEventArgs eventArgs)
at System.Drawing.Printing.PrintDocument._OnPrintPage(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 Telerik.Reporting.Processing.ReportProcessor.PrintReport(IReportDocument reportDocument, PrinterSettings printerSettings)
at CLGroup.Intranet.DataFacade.Print.ExecutePrint.ExecutePrintDocument() PrinterName : \\EMVMIIS01\GELAS01 BranchId : 11 Feature : InvoicePrint

2 Answers, 1 is accepted

Sort by
0
Koen L
Top achievements
Rank 1
answered on 13 Jul 2012, 05:27 AM
Any news about this topic?
We still have this error randomly.
0
IvanY
Telerik team
answered on 17 Jul 2012, 02:02 PM
Hello Koen,

Up to your question - not only the report count but also the report layouts can be of significant importance for the memory consumption. So it will be best to provide us with additional details in order to advise you accordingly. What is the count of items per page and how many small reports do you generate? 

If you experience the slowdown in page orientated format do you have horizontal paging and how many pages all the reports generate? The page count could also cause a delay if you are using the PageCount global object in your reports. What is the complexity of your report layout? What is the count of the other items, tables, charts? What machines do you use for report rendering (in terms of CPU, RAM)?

Additionally you may want to check the Performance Considerations how-to article and considering the fact that you are running multiple small reports at the same time the scenario is actually comparable to having a big report.

Now regarding the ReportProcessor - when you put it in a using statement the object will be automatically disposed once the statement ends, but in your case this will not help as the main problem is the size/count of the reports and not the resources that will be freed by the instantiated ReportProcessor once the processing is complete.

Kind regards,
IvanY
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Koen L
Top achievements
Rank 1
Answers by
Koen L
Top achievements
Rank 1
IvanY
Telerik team
Share this question
or