How to Change the Default Rendering on SSRSby Daniel James
The default rendering in Microsoft SQL Server Reporting Services (SSRS) Report Manager delivers the report as a dynamic HTML web page. While this is typically very useful, there are many instances where it would be more useful to provide a direct link to an Excel or PDF version of the report. The SSRS Report Manager is not very customizable, but it is possible to change the rendering format using URL attributes. This will allow you to create a custom, direct link to the report that renders in the format of your choosing.
Locate the report you will be creating a link to using the ReportServer portal in SSRS. Typically, this is found at http://servername/ReportServer. The interface will be minimal, but will display the same folders and reports as the Report Manager.
Copy the URL. Note that the URL may contain several parameters, but the part to look for is the report path, which can be found between the "?" and the first "&", if any exists. In the following example, the report path is "/Folder/Report%20Name": http://servername/ReportServer?/Folder/Report%20Name&rs:Command=Render
Create a new URL using the report path with some additional parameters to specify the rendering format. The "rs:Format" parameter specifies the rendering format for the report. The following values are common for a default installation of SSRS: HTML4.0, MHTML, IMAGE, EXCEL, PDF and CSV. The "rs:Command" parameter set to "Render" instructs the report server to render the report in the specified format. For example, for a URL that always renders the report as a PDF document, use the following: http://servername/ReportServer?/Folder/Report%20Name&rs:Format=PDF&rs:Command=Render
Render a report as an Excel document this way: http://servername/ReportServer?/Folder/Report%20Name&rs:Format=EXCEL&rs:Command=Render
- The same security model as in Report Manager applies to accessing reports. If authentication is required to view a report in Report Manager, the user will still be required to authenticate when following the custom URL.
- The URLs created can be linked to directly from other websites, without the user seeing any of the Report Manager interface (i.e., a direct PDF or Excel download).
- Thinkstock Images/Comstock/Getty Images