Search code examples
c#activereportscomponentone

ActiveReports and Bitmaps using too much memory


Our software needs to produce variable-sized reports, which can easily move past 100 pages. Several of these pages contain large images/Bitmaps.

Is there a reliable way to prevent the overall report from consuming all available memory? Once we have enough pages being generated, the app almost never finishes creating the report without running out of memory. Most of the memory is consumed by Bitmaps that we cannot release. (Attempting to dispose of them before the report is complete causes the report generation to fail.)


Solution

  • John

    Have you tried using the cache to disk with ActiveReports?

    http://helpcentral.componentone.com/nethelp/AR7Help/OnlineEn/CacheToDiskAndResourceStorage.html More details here: http://helpcentral.componentone.com/nethelp/AR7Help/OnlineEn/GrapeCity.ActiveReports.Document.v7~GrapeCity.ActiveReports.Document.SectionDocument~CacheToDisk.html

    Set this up prior to running the report. For example: report.Document.CacheToDisk = true; report.Run();