I have the problem with using a lot of memory for creating StiReport. My app creates a report by pages, and saves the main report into hard drive in the end. The main report becomes large in the process.
Step 1: I'm creating a main report:
Code: Select all
var mainReport = new StiReport()
{
IsRendered = true,
NeedsCompiling = false,
ReportName = "Some name"
};
Code: Select all
var report = new StiReport();
// this some code
await report.RenderAsync();
foreach (StiPage page in report.RenderedPages)
{
page.Report = mainReport;
page.Guid = Guid.NewGuid().ToString("N");
mainReport.RenderedPages.Add(page);
}
// here the main report becomes large
Code: Select all
var data = mainReport.SavePackedDocumentToByteArray();
// this saving into hard drive by stream