Cache Mode

When using very large reports with Stimulsoft Reports.Net in 32-bit environments, there is a chance of getting an out of memory exception. Such a scenario could be a small report that is printed to more than 20.000 pages in one go. The exception is thrown during report rendering inside Stimulsoft Reports.Net, this is after the DataSet has been generated by the PPJ Framework and passed on to the report.

Fortunately, Stimulsoft Reports.Net provides means to handle very large reports through different cache settings. The most important setting is part of the report properties, called "Report Cache Mode" with the following options:

Off

Caching is deactivated for this report, all pages are rendered in memory entirely without any caching to disk.

On

Caching is enabled directly when report rendering is started.

Auto

Caching is performed after a certain number of pages have been rendered. To further optimize and tweak the behavior of Stimulsoft Reports.Net, there are three additional options in the Stimulsoft report object that can be accessed at runtime through the PPJ Framework:

StiOptions.Engine.ReportCache.LimitForStartUsingCache: This is the cut off point as a page count of when caching kicks in. For example if this static property has been set to 100 then all pages after 100 will cause the report cache to be used. For all pages up to 100 the report cache is not beeing used.

StiOptions.Engine.ReportCache.AmountOfQuickAccessPages: When rendering a report, the engine usually stores some pages in memory to speed up some internal processes. The memory usually contains just the last rendered pages. In order to change the number of pages to keep in memory, use this static property to further optimize Stimulsoft Reports.Net.

StiOptions.Engine.ReportCache.CachePath: Specify the directory to use for caching purposes.

These properties can be modified at runtime during report processing and even before, because they are static.

Last updated