Export HTML File Per Page
Export HTML File Per Page
Is there a way that I can have separate HTML files generated for each page of a report when using the Save>HTML function from the report viewer instead of 1 html file with all the pages?
-
- Posts: 7345
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export HTML File Per Page
Hello,
Unfortunately, direct;y in the viewer, designer it is not possible.
You can use code to export by pages in your code or use OnProcessExport event of the viewer.
Thank you.
Unfortunately, direct;y in the viewer, designer it is not possible.
You can use code to export by pages in your code or use OnProcessExport event of the viewer.
Thank you.
Re: Export HTML File Per Page
What would the code look like to do that in the Exporting event?
-
- Posts: 7345
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export HTML File Per Page
Hello,
Something like:
Thank you.
Something like:
Code: Select all
report.Load();
report.Render(false);
for (int i = 0; i < report.RenderedPages.Count; i++)
{
var exportSettings = new StiHtmlExportSettings();
exportSettings.PageRange = new StiPagesRange(i);
report.ExportDocument(StiExportFormat.Html, "filename", exportSettings);
}
Re: Export HTML File Per Page
Thank You. I don't think I quite understand what I need to do with that code. When I try to use it in the Exporting Event, I get a number of errors.
Can you review the attached sample report and advise?
Thanks for your help.
Tim S.
Can you review the attached sample report and advise?
Thanks for your help.
Tim S.
- Attachments
-
- ExportReport.mrt
- (4.13 KiB) Downloaded 152 times
-
- Posts: 7345
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export HTML File Per Page
Hello,
The provided code not for using in the report. You can use it in your project for exporting reports.
Thank you.
The provided code not for using in the report. You can use it in your project for exporting reports.
Thank you.
Re: Export HTML File Per Page
Is there any way to do it in the report?
-
- Posts: 7345
- Joined: Tue Mar 20, 2018 5:34 am
Re: Export HTML File Per Page
Hello,
Unfortunately, no.
Thank you.
Unfortunately, no.
Thank you.