What will be the REST API URL for the SSRS to be embedded in the Blazor Server Application?

Aima Maqsood 25 Reputation points
2025-01-22T10:49:43.2466667+00:00

I am working on adding the SSRS based reports into the Blazor Sever Application. SSRS Configuration is working fine and I can access SSRS on browser as well.

I searched for different methods to implement the SSRS reports (created using MS Report Builder) and found few:

  1. Using iframe to simply embed the reports
  2. SSRS REST API embedding Reports (Read this on Microsoft site: https://learn.microsoft.com/en-us/sql/reporting-services/developer/rest-api?view=sql-server-ver15)
  3. Third party tools (of course not, they are highly paid)
  4. Create a Web Page in .NET Framework and used as Report Viewer in Blazor, of course not

When I write down this API: https://localhost:440/ReportServer/api/v2.0/Reports it shows the list of available reports on Report Server:

localhost/ReportServer - /


                 22 January 2025 06:37        <dir> 

Microsoft SQL Server Reporting Services Version 16.0.1116.38

But when I searched:
https://localhost:440/ReportServer/api/v2.0/Reports(ItemPath='/BlazorSQL-Reports/Details')/Export(Format='PDF')

:::::BlazorSQL-Reports folder has a Details.rdl file.

I always end up getting HTTP Error 400, and file does not downloaded as well.

Plus is there any way I can only render the (Details.rdl) or any other Report file in my Blazor Application using the REST API, in PDF Format?

References:

I saw these links as well, but didn't find anything well:
https://learn.microsoft.com/en-us/answers/questions/169845/ssrs-reports-export-pdf-and-excel-in-rest-api

https://learn.microsoft.com/en-us/answers/questions/749433/use-ssrs-2017-2019-rest-api-to-render-report-and-s

https://learn.microsoft.com/en-us/answers/questions/1692165/srss-rest-api-get-the-content-of-the-report

https://learn.microsoft.com/en-us/answers/questions/111817/ssrs-api-download-pdf

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,654 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,984 questions
{count} votes

Accepted answer
  1. ZoeHui-MSFT 40,056 Reputation points
    2025-01-23T05:43:34.8366667+00:00

    Hi @Aima Maqsood

    As far as I know, there is no method available in RestAPI provided to render the PDF of the report.

    In SSRS, the rs:Format parameter accepts the following common values based on the report rendering extensions installed on the report server.

    https://learn.microsoft.com/en-us/sql/reporting-services/export-a-report-using-url-access?view=sql-server-ver16

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

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

    And then you may embed to your app. Example below

    User's image

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.