Out of memory exceptions
Posted: Wed Dec 03, 2014 10:37 pm
Hi, we are using a registered version of Stimulsoft Reports.Ultimate 2014.3.
I experience Out of Memory exceptions when exporting my report and red crosses when previewing using StiViewerControl.
I need to display many high quality images in a report, sometimes over 500 pages. My report will have 1 image per page, resized to fit on the page. Before exporting I use the preview control. Then, the user should be allowed to export to multiple formats, often to PDF, Word or PowerPoint.
No matter how many images the report have, there should be no Out of memory errors. I'm sure we don't need to hold all images in memory.
I have created a custom test project to show the problem. To keep things simple, I pass a list of 50 objects with the same file name to display 50 pages of the same images. In real life it would be a different image for each page.
When the form is loaded, i see a big red cross. If you still are able to see it correctly, you can increase the number of pages. Instead of using the preview control, exporting it directly (with the method ExportDocument) will have an Out of memory exception.
I know my image (Macaca_nigra_self-portrait_large.jpg) is big (1.6 MB), but even when reducing the size I will eventually have exceptions. For instance, I tried the smaller image Macaca_nigra_self-portrait.jpg (400KB) with 500 pages which normally display fine on my computer but when I export to Word or PowerPoint from the preview control, I get an out of memory exception.
Could you please kindly help me find a solution ?
Thank you & Best regards
I experience Out of Memory exceptions when exporting my report and red crosses when previewing using StiViewerControl.
I need to display many high quality images in a report, sometimes over 500 pages. My report will have 1 image per page, resized to fit on the page. Before exporting I use the preview control. Then, the user should be allowed to export to multiple formats, often to PDF, Word or PowerPoint.
No matter how many images the report have, there should be no Out of memory errors. I'm sure we don't need to hold all images in memory.
I have created a custom test project to show the problem. To keep things simple, I pass a list of 50 objects with the same file name to display 50 pages of the same images. In real life it would be a different image for each page.
When the form is loaded, i see a big red cross. If you still are able to see it correctly, you can increase the number of pages. Instead of using the preview control, exporting it directly (with the method ExportDocument) will have an Out of memory exception.
I know my image (Macaca_nigra_self-portrait_large.jpg) is big (1.6 MB), but even when reducing the size I will eventually have exceptions. For instance, I tried the smaller image Macaca_nigra_self-portrait.jpg (400KB) with 500 pages which normally display fine on my computer but when I export to Word or PowerPoint from the preview control, I get an out of memory exception.
Could you please kindly help me find a solution ?
Thank you & Best regards