ilich / MvcReportViewer

ASP.NET MVC Html Helpers for ReportViewer Control.
MIT License
282 stars 131 forks source link

How to use MvcReportViewer in asp.net web forms #185

Closed itw2016 closed 7 years ago

itw2016 commented 7 years ago

Dear Author,

I have an old project designed in asp.net web form using vs2010, now I would like to call SSRS report using your MvcReportViewer. How do I go about doing this ?

Thanks in advance

Regards, itw2016

tiesont commented 7 years ago

You don't need this viewer if you're using WebForms; this is a wrapper around the WebForms ReportViewer to allow it to be used in an ASP.NET MVC view.

itw2016 commented 7 years ago

I have used this viewer in my other new project, it's interface is really clean and nice.

For my old projects, can I add MVC into web forms projects first, then use this MvcReportViewer ? meaning I use this technique to add Mvc in old web forms projects first: https://www.packtpub.com/books/content/mixing-aspnet-webforms-and-aspnet-mvc

I have not tested yet, is the above idea workable ?

tiesont commented 7 years ago

The idea covered there is still correct, if out-of-date. http://www.davepaquette.com/archive/2013/12/30/so-you-inherited-an-asp-net-web-forms-application.aspx is probably more current. The key takeaway is that you just have to add the MVC packages via NuGet, and then do a little bit of configuration. MVC is still ASP.NET, after all.

itw2016 commented 7 years ago

Thanks man, we will look into this suggestion. Meantime, we are also considering the following webforms and ssrs integration for our old projects: http://www.smarterasp.net/support/kb/a1705/how-to-integrate-ssrs-into-asp_net.aspx

ilich commented 7 years ago

The best to start using the extension is sample application. For example, https://github.com/ilich/MvcReportViewer/blob/master/MvcReportViewerExample/Views/Home/Fluent.cshtml