sql-serverreportingsql-server-2017reportserverssrs-2017

How to export SSRS 2017 report using REST API


I've setup SSRS 2017.I need to export an SSRS report using their new REST API, I've been looking through the API specification here but I can't find a method in swagger specification to render/export that report using an HTTP client. This Question maybe asking for same that i'm looking for.


Solution

  • So far I know Currently, there is no method available in RestAPI provided by Microsoft available here

    There is an alternative to generate report by utilizing Url Access (SSRS)

    URL access to the report server in SQL Server Reporting Services (SSRS) enables you to send commands to a report server through a URL request.

    URL Access Syntax

    URL requests can contain multiple parameters that are listed in any order. Parameters are separated by an ampersand (&) and name/value pairs are separated by an equal sign (=).

    Export a Report Using URL Access

    You can optionally specify the format in which to render a report by using the rs:Format URL parameter. The HTML4.0 and HTM5 formats (rendering extension) will render in the browser and for other formats, the browser will prompt to save the report output to a local file.

    For example, to get a PDF copy of a report directly from a native mode report server:

    http://myrshost/ReportServer?/myreport&rs:Format=PDF  
    

    You can also provide parameters to this using syntax

    http://myrshost/ReportServer?/activeusers&UserStatus=true&rs:Format=PDF
    

    For more details, you can visit

    https://learn.microsoft.com/en-us/sql/reporting-services/export-a-report-using-url-access