Page 1 of 1

Export more than one report

Posted: Thu Apr 12, 2007 8:38 am
by Light
Hi

Is it possible to export more than one generated reports to one file (pdf, excel etc?)?
E.g. we have a collection of StiReport objects with different templates and different data sources and we want to create one pdf (or any other) file that will contain all repots one by another?

Export more than one report

Posted: Thu Apr 12, 2007 12:59 pm
by Vital
Hello!

You can use following code:

Code: Select all

StiReport resultReport = new StiReport();
foreach (StiPage page in report1.RenderedPages)
{
    resultReport.RenderedPages.Add(page);
    page.Report = resultReport;
}

foreach (StiPage page in report2.RenderedPages)
{
    resultReport.RenderedPages.Add(page);
    page.Report = resultReport;
}

.....
.....
After this code you can export report resultReport.

Thank you.