ReportCacheMode not working ?
Posted: Tue Nov 30, 2010 10:57 am
The Result of a analysis we produce is a huge dataset, which is too big to load into memory.
We tried to split it off and build several smaller dtatasets and reports.
The smaller reports we want to rejoin to the final report using ReportCacheMode = On.
During report creation we always get an OutOfMemoryException.
Does ReportCacheMode not work in such a scenario ?
Kind regards
We tried to split it off and build several smaller dtatasets and reports.
The smaller reports we want to rejoin to the final report using ReportCacheMode = On.
During report creation we always get an OutOfMemoryException.
Does ReportCacheMode not work in such a scenario ?
Code: Select all
//--- configure ReportCache
StiOptions.Engine.ReportCache.LimitForStartUsingCache = 3000;
StiOptions.Engine.ReportCache.AmountOfQuickAccessPages = 3000;
StiOptions.Engine.ReportCache.CachePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
StiReport mainReport = new StiReport();
mainReport.Load(fileNameReportKontoauszug);
mainReport.ReportCacheMode = StiReportCacheMode.Auto;
mainReport.RenderedPages.Clear();
mainReport.NeedsCompiling = false;
mainReport.IsRendered = true;
while (recordStart < recordEnd)
{
// fill partial datasets
kontoauszug.Clear();
kontoauszug.Dispose();
kontoauszug = KontoauszugService.LoadKontoauszugByPersId(persIds);
// Render partial reports
StiReport partialReport = new StiReport();
partialReport.Load(fileNameReportKontoauszug);
partialReport.DataSources.Clear();
partialReport.RegData("Kontoauszug", kontoauszug);
partialReport.RegData("ReportEnvironment", ReportEnvironment.GetReportEnvironment());
partialReport.Dictionary.Synchronize();
partialReport.ReportCacheMode = StiReportCacheMode.On;
partialReport.RenderedPages.Clear();
partialReport.Render();
// Add rendered pages to mainreport
mainReport.ReportCacheMode = StiReportCacheMode.On;
foreach (StiPage reportPage in partialReport.RenderedPages)
{
reportPage.Report = partialReport;
mainReport.RenderedPages.Add(reportPage);
}
}
mainReport.Show();