Page 1 of 1

File zip with more reports

Posted: Tue Apr 12, 2011 8:26 am
by MarcoGecoit
Good evening
I need to create a zip file with multiple reports, they are saved as individual files.
How can I do to attach these files?
Thanks
Marco

File zip with more reports

Posted: Wed Apr 13, 2011 1:46 am
by Alex K.
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.

File zip with more reports

Posted: Tue Apr 19, 2011 9:33 am
by MarcoGecoit
Hi,
I've an application web and many reports (all_1.mrt, all_2.mrt, ecc...)
I need to print all togheter, in a single zip file (not a many pdf)
Is it possibile to append many reports in StiReport object? IF yes, is it possible to save in zip format?
Thank you
Marco

File zip with more reports

Posted: Wed Apr 20, 2011 5:43 am
by Alex K.
Hello,

Please let us know do you want to merge all of your reports into one report and then export it into a one PDF file?

Thank you.

File zip with more reports

Posted: Thu Apr 21, 2011 3:01 am
by MarcoGecoit
Hello,
Because these files can be printed individually in different parts of the web application, only at a certain point I need to print them all together by pressing a button.
The objective is to get in Response to a single file.
I wondered if I can combine all these files into a single StiReport object, or create as many pdf to merge with a zip library of third property.
Thank you

File zip with more reports

Posted: Thu Apr 21, 2011 8:37 am
by Alex K.
Hello,

Please see the sample code how to megre two report in one:

Code: Select all

StiReport report1 = new StiReport();
report1.Load("e:\\Report1.mrt");
report1.Render(false);

StiReport report2 = new StiReport();
report2.Load("e:\\Report2.mrt");
report2.Render(false);

StiReport reportAll = new StiReport();
reportAll.Render();
reportAll.RenderedPages.Clear();

foreach (StiPage page in report1.RenderedPages)
{
    reportAll.RenderedPages.Add(page);
}

foreach (StiPage page in report2.RenderedPages)
{
    reportAll.RenderedPages.Add(page);
}
reportAll.Show();
Thank you.

File zip with more reports

Posted: Fri Apr 22, 2011 2:48 am
by MarcoGecoit
Perfect, it works fine!
Thank you
Marco

File zip with more reports

Posted: Fri Apr 22, 2011 3:26 am
by Andrew
Great! :biggrin:

Have a nice day!
Thank you.