SSRS Report with MVC3 Razor Engine
-
Saturday, April 21, 2012 12:10 PM
I had created report using SSRS. Now i want to integrate this Report with my MVC3 application. This MVC3 application use Razor Engine.Can anyone tell me how i integrate SSRS Report to My MVC3 application.????
All Replies
-
Tuesday, May 08, 2012 12:26 AM
- Create a partial view ascx page
- Register the Microsoft.ReportViewer.WebForms assembly
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
Now within the partial ASCX view:
<form runat="server" id="frmReports"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <rsweb:ReportViewer ID="_objLeadFlowReport" runat="server" Visible="true" Width="100%" Height="500"></rsweb:ReportViewer> </form>
Now from within your razor view render the ASCX
@Html.Partial("<ASCX Partial view name>");

