Export more than one report

Stimulsoft Reports.NET discussion
Post Reply
Light
Posts: 1
Joined: Thu Apr 12, 2007 8:33 am

Export more than one report

Post 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?
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Export more than one report

Post 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.
Post Reply