How to Display SSRS report in ASP.NET MVC Web application.

In this article I will show how to display an SSRS report in ASP.NET MVC application. For this demo I am using Visual Studio 2012, ASP.NET MVC 4 - Empty Template, an existing SSRS report deployed on SSRS Server and a nuGet package.

C# (7.5 MB)
4.5 Star
4,598 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • What about .Net Core?
    2 Posts | Last post September 03, 2018
    • Hey Hussain,
           I really appreciate this article as it helps with an existing requirement I have for viewing reports inside our MVC application.
           I also tried to test this "from scratch" using a ".Net core MVC" app and ran into a bunch of issues.  Have you tried to port it?  I had to stop, because I didn't give myself enough time for the versioning issues - which seem inevitable.
    • Hi John,
      No i haven't got opportunity to try this on .NET core. would really love to create a sample using .NET core. will keep you posted on this.
  • How to Display RDL file in ASP .Net MVC
    1 Posts | Last post August 13, 2018
    • Hi  - Thanks for the wonderful example. I have a requirement where I need to display a RDL/ RDLC file int eh report viewer. Any pointers?
  • Will this work out side the network?
    2 Posts | Last post March 22, 2018
    • Thanks for the wonderful example.
      I have a requirement from the client to access one of display their SSRS  reports out side the domain network. As far as i know Iframe works only with in the domain. Please let me know what addition steps i need to include in order to make this work to the external user who logs into the client website.
      Background: I am a SQL BI Developer who is learning .net.
    • There are no additional steps- If the SSRS report is set permission to access to the external user -( you are from SQL BI  may be you know more about permission to access SSRS report to external users)
      Hope this answers..  
  • Content type of '', but expected 'text/xml'
    1 Posts | Last post November 24, 2017
    • Hi there,
      I get the following error when I try to view my report:
      The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
      Client found response content type of '', but expected 'text/xml'. The request failed with an empty response.
      I am using SSRS 2017 and MVC 5 I can open my report directly using my url: http://server/reports?/projectname/reports/report
      Any idea on what could be wrong?
      Great article, by the way
    1 Posts | Last post October 13, 2017
  • Report Folder ?
    2 Posts | Last post August 28, 2017
    • Hi,
      Thank you for the nice post and effort.
      I want to know how i can display my own report. I configured my folder under web.config and it is containing many folder ... but i cannot see any report of them in the browser after i run the solution.
      Please help :) 
    • What do you mean by your own report? all the reports that you design have to be placed on the reporting server, under the reports folder. If you look at the code - its connecting to reporting server.
      Hope this helps
  • does this work for .net 4.6.2?
    3 Posts | Last post April 27, 2017
    • when I try to run the report I get the following error:
      System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
    • The assembly is missing- Can you check when you ran th nugget package what assembly were installed. f you look at the article I have  mentioned "This installation will add to the project: 2 assemblies (Microsoft.ReportViewer.WebForms & ReportViewerForMvc)to references an .aspx page (ReportViewerWebForm.aspx) and httphandlers settings in the web.config file."  in my case the nugget package installed assembly version 11.00 
      Hope this helps.
    • Frankly speaking I haven't tried on for .NET 4.6 - I don't want to provide you false answer.