Export to several files
Export to several files
Is there a way of exporting a report to several files?
For example i have a report with a group by country. Could i have a export wich generated several files, one for each group?
thanks
For example i have a report with a group by country. Could i have a export wich generated several files, one for each group?
thanks
Re: Export to several files
Hello,
To do this automatically from the preview, sorry, there is no such functionality. But you can export from the code by specially preparing the template and adding some rows of code. If you need a sample, please let us know, we may prepare this.
Thank you.
To do this automatically from the preview, sorry, there is no such functionality. But you can export from the code by specially preparing the template and adding some rows of code. If you need a sample, please let us know, we may prepare this.
Thank you.
Re: Export to several files
Yes, please. A sample would be great.
It would be insteresting to export a report to several files, assuming the report has one group (for example Client Orders Report - it has a group by Client Code) it generates one file for each different group (Client) with their Orders
Of course the report starts a new page on every new group
Thanks!
JB
It would be insteresting to export a report to several files, assuming the report has one group (for example Client Orders Report - it has a group by Client Code) it generates one file for each different group (Client) with their Orders
Of course the report starts a new page on every new group
Thanks!
JB
Andrew wrote: ↑Mon Aug 16, 2021 8:38 am Hello,
To do this automatically from the preview, sorry, there is no such functionality. But you can export from the code by specially preparing the template and adding some rows of code. If you need a sample, please let us know, we may prepare this.
Thank you.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export to several files
Hello,
We need some additional time to prepare a sample for you.
Thank you.
We need some additional time to prepare a sample for you.
Thank you.
Re: Export to several files
Hi there,
My question is kinda similar. We want to export directly to different filetypes (ex: PDF, Excel, CSV (data)) without viewing the report and it contains input parameters from the user. We want to display first the input parameters (same in the Viewer/Preview) but instead of doing a render after submitting, directly export it to the different filetypes. Is this possible?
Thanks!
My question is kinda similar. We want to export directly to different filetypes (ex: PDF, Excel, CSV (data)) without viewing the report and it contains input parameters from the user. We want to display first the input parameters (same in the Viewer/Preview) but instead of doing a render after submitting, directly export it to the different filetypes. Is this possible?
Thanks!
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export to several files
Hello,
We need some additional time to prepare a sample for you.
Thank you.
We need some additional time to prepare a sample for you.
Thank you.
Re: Export to several files
Thank you Lech
Lech Kulikowski wrote: ↑Fri Aug 27, 2021 11:14 am Hello,
We need some additional time to prepare a sample for you.
Thank you.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export to several files
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Reports/1.mrt");
var exportReport = new Stimulsoft.Report.StiReport();
exportReport.reportUnit = report1.reportUnit;
exportReport.render();
exportReport.renderedPages.clear();
report.renderAsync(function () {
for (var index = 0; index < report.renderedPages.count; ++index) {
exportReport.renderedPages.add(report.renderedPages.getByIndex(index));
exportReport.exportDocument(Stimulsoft.Report.StiExportFormat.Pdf);
// Export report to PDF format
exportReport.renderedPages.clear();
}
});
Re: Export to several files
Lech Kulikowski wrote: ↑Thu Sep 02, 2021 12:55 pm Hello,
You can use the following code:Thank you.Code: Select all
var report = new Stimulsoft.Report.StiReport(); report.loadFile("Reports/1.mrt"); var exportReport = new Stimulsoft.Report.StiReport(); exportReport.reportUnit = report1.reportUnit; exportReport.render(); exportReport.renderedPages.clear(); report.renderAsync(function () { for (var index = 0; index < report.renderedPages.count; ++index) { exportReport.renderedPages.add(report.renderedPages.getByIndex(index)); exportReport.exportDocument(Stimulsoft.Report.StiExportFormat.Pdf); // Export report to PDF format exportReport.renderedPages.clear(); } });
Thanks Lech! We will try this code snippet. We hope this is what we are looking for.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export to several files
Hello,
You are welcome.
You are welcome.