Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC + SSRS + Embeded Report

Does anyone know of a method to embed a SQL Server Reporting Services(SSRS) report into an MVC application? We are using Razor Views exclusively and do not want to add any .aspx pages to our application.

like image 667
Mark Meisel Avatar asked Dec 22 '22 07:12

Mark Meisel


2 Answers

You have two options:

  1. Render the .rdlc directly: link
  2. Include a web forms project along with your MVC project link

It sounds like you're not too keen on the two co-existing web-frameworks so the first option might be the best bet.

like image 156
Eganr Avatar answered Dec 31 '22 10:12

Eganr


If you want basic report viewing the option would be to render in code and stream to An iftame. Since the report viewer is a server control and server controls were generally designed with web forms in mind you would be hacking it otherwise - ie you can't

Why not just include a folder for aspx? You aren't losing anything by it but a theoretical pureness to stay away from web forms which was what the control was designed for. If you want to take the hit with an .ascx contol you can include it that way buy again you are using web forms.

like image 30
Adam Tuliper Avatar answered Dec 31 '22 09:12

Adam Tuliper