Hi y'all,
My report may have several thousand pages with text and images, so I enabled the cache function to reduce memory consumption.
This is a few lines of code to show what I did:
Stimulsoft.Report.StiOptions.Export.Pdf.ReduceFontFileSize = true;
ReportCacheMode = StiReportCacheMode.On;
StiOptions.Engine.ReportCache.LimitForStartUsingCache = 100;
StiOptions.Engine.ReportCache.CachePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
RegData(mDataSet);
Compile();
Dictionary.ImportXMLSchema(mDs);
Dictionary.Synchronize();
Render(false);
When some 150 pages are rendered, this error is thrown:
The process cannot access the file 'C:\Documents and Settings\kejo\My Documents\StimulsoftReportsCache\3c65008ea754432eb72edb9f18eb2ca5\be9e213ee12c46b1bdf031b230e0eef3.mch' because it is being used by another process.
Can I do anything to avoid the problem?
We use version 2007.3.0.0 from the patch SR_2007.09.24_R2005.zip.
Regards,
Kenneth Jonsson
Problem with cache and large reports
-
- Posts: 9
- Joined: Wed Jun 13, 2007 7:20 am
- Location: Sweden
Problem with cache and large reports
All your steps are correct.
Maybe try to reduce LimitForStartUsingCache parameter to 40.
Could you please provide us with the test application or report template which produces such a result.
Thank you.
Maybe try to reduce LimitForStartUsingCache parameter to 40.
Could you please provide us with the test application or report template which produces such a result.
Thank you.
-
- Posts: 9
- Joined: Wed Jun 13, 2007 7:20 am
- Location: Sweden
Problem with cache and large reports
I send you the XML-file loaded to the report, and the report definition. But since rendering fails I can't send a proper dump of the report with all displayed images. Image files are the bulk of the report. Please look for a mail to support@stimulsoft.com with same subject as of this thead.
Problem with cache and large reports
Thank you for the sample application and describing your requirements in detail.
The same issue is described here:
http://forum.stimulsoft.com/Default.aspx?g=posts&t=913
So the only way to avoid this behavior is to reduce size of the images. I've tested your report and code as well and for the smaller images I haven't met the exception.
Thank you.
The same issue is described here:
http://forum.stimulsoft.com/Default.aspx?g=posts&t=913
So the only way to avoid this behavior is to reduce size of the images. I've tested your report and code as well and for the smaller images I haven't met the exception.
Thank you.