HTML Export from Report Server

1 Answer 19 Views
Report Management Rest API Scheduler
A
Top achievements
Rank 1
A asked on 29 Feb 2024, 11:50 AM

Hi,

is there any way to get a report exported as an html-file from the Report Server? Automated with a task would be perfect, but it seems I can't do exporting files with tasks and there is no html-export within the Report Server. I've tried mhtml (web archive), but it lacks of compatibility. I've also tried Rest API via postman, but I only get a result like the following:

("akt" is the user for the request...)

Any ideas?

Thanks,
Andre

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 05 Mar 2024, 08:22 AM

Hi Andre,

The Report Server Manager export options are limited to the ones returned by the URI '{reportServerName:port}/api/reports/formats', by default:

[{"name":"PDF","localizedName":"Acrobat (PDF) file"},{"name":"CSV","localizedName":"CSV (comma delimited)"},{"name":"XLS","localizedName":"Excel 97-2003"},{"name":"XLSX","localizedName":"Excel Worksheet"},{"name":"PPTX","localizedName":"PowerPoint Presentation"},{"name":"RTF","localizedName":"Rich Text Format"},{"name":"IMAGE","localizedName":"TIFF file"},{"name":"MHTML","localizedName":"Web Archive"},{"name":"DOCX","localizedName":"Word Document"},{"name":"XPS","localizedName":"XPS Document"}]

You may use the REST API of the ReportServer to export in other formats like HTML. For the needed steps you may check the KB article Export Report from Report Server via .NET Client.

On the POST Request api/reportserver/v2/documents you should specify the Format as HTML and the DeviceInfo based on the article Device Information Settings for the HTML5 rendering format.

For the specifics of the HTML rendering, I suggest als the article Design Considerations for the HTML Rendering.

Regards,
Todor
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com
A
Top achievements
Rank 1
commented on 05 Mar 2024, 11:03 AM

Hi Todor,

thanks for your help - now I get a proper html-file from the server. The only thing is that I get just a gzip compressed response (via postman). Is this the normal situation? Maybe the response is double compressed and postman decompresses only the first compression?

Thanks,
Andre

Todor
Telerik team
commented on 05 Mar 2024, 01:25 PM

Hello Andre,

Indeed, the HTML is served as GZIP, which is a recognized bug in our system. If the report contains multiple pages, only the first one gets exported. The same is valid also for PNG rendering.

Note also that when the report contains images, they are referenced with relative URLs of PNG files stored in the Storage of the Report Server, and won't appear when you open the generated HTML report in the browser. The Graph and rotated text are displayed as images in the HTML rendering, hence you may lose them if you have such in the report. The reason is that this format is designed to be used with our HTML5--based Report Viewers.

You may log a feature request in our public feedback portal to introduce a new HTML format that embeds all resources. For example, the images may be embedded as SVG that we support.

Tags
Report Management Rest API Scheduler
Asked by
A
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or