Object doesn't support property or method 'sfReportViewer'
Hi Paul,
Thanks you for your interest in Syncfusion products.
We have tested this issue at our end. But we dint face any issue with ReportViewer rendering. Please check the following items with MVC application to run the ReportViewer.
1. Assemblies for MVC Application.
a. Syncfusion.Core.
b. Syncfusion.Shared.MVC.
c. Syncfusion.Linq.Base.
d. Syncfusion.ReportViewer.MVC.
2. Assemblies information in WebConfig.
3. Namespaces in WeConfig.
<compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="Syncfusion.Core, Version=11.104.0.21, Culture=neutral, PublicKeyToken=632609B4D040F6B4"/> <add assembly="Syncfusion.Shared.Mvc, Version=11.144.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> <add assembly="Syncfusion.Linq.Base, Version=11.104.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> <add assembly="Syncfusion.ReportViewer.Mvc, Version=11.144.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89""/> </assemblies> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Account/Login" timeout="2880" /> </authentication> <pages> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> <add namespace="Syncfusion.Mvc.Shared"/> <add namespace="Syncfusion.ReportViewer.Mvc"/> </namespaces> </pages> |
4. Http handlers for ReportViewer and Syncfusion Script Manager in Web config.
<system.webServer> <handlers> <remove name="MvcResourceHandler"/> <add verb="GET,HEAD" name="MvcResourceHandler" path="MvcResourceHandler.axd" type="Syncfusion.Mvc.Shared.MvcResourceHandler, Syncfusion.Shared.Mvc, Version=11.144.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> <add verb="*" path="syncfusion_generatereports.axd" name="syncfusion_generatereports" type="Syncfusion.ReportViewer.Mvc.ReportViewerHandler, Syncfusion.ReportViewer.Mvc, Version=11.144.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> </handlers> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true" /> </system.webServer> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="Syncfusion.Core, Version=11.104.0.21, Culture=neutral, PublicKeyToken=632609B4D040F6B4"/> <add assembly="Syncfusion.Shared.Mvc, Version=11.144.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> <add assembly="Syncfusion.Linq.Base, Version=11.104.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> <add assembly="Syncfusion.ReportViewer.Mvc"/> </assemblies> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Account/Login" timeout="2880" /> </authentication> <pages> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> <add namespace="Syncfusion.Mvc.Shared"/> <add namespace="Syncfusion.ReportViewer.Mvc"/> </namespaces> </pages> <httpHandlers> <add verb="GET,HEAD" path="MvcResourceHandler.axd" type="Syncfusion.Mvc.Shared.MvcResourceHandler, Syncfusion.Shared.Mvc, Version=11.144.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" validate="false"/> <add verb="*" path="syncfusion_generatereports.axd" validate="false" type="Syncfusion.ReportViewer.Mvc.ReportViewerHandler, Syncfusion.ReportViewer.Mvc, Version=11.144.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89"/> </httpHandlers> |
5. Ajax and jquery script in page.
6. Syncfusion ScriptManager in Page.
Razor: <!DOCTYPE html> <html> <head runat="server"> <meta name="viewport" content="width=device-width" /> <title>ViewReport</title> <script src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/MicrosoftMvcAjax.js")" type="text/javascript"></script> </head> <body> <div style="width:100%;height:400px;"> @{Html.Syncfusion().ReportViewer("report", (ReportViewerModel)ViewData["ReportModel"]).Render();} </div> @{Html.Syncfusion().ScriptManager().Combine(true).Minify(true).Render();} </body> </html> ASPX: <html> <head runat="server"> <meta name="viewport" content="width=device-width" /> <title>ViewReport</title> <script src="<%=Url.Content("~/Scripts/jquery-1.6.2.min.js")%>" type="text/javascript"></script> <script src="<%=Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script> <script src="<%=Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" type="text/javascript"></script> </head> <body> <div style="width:100%;height:400px;"> <%= Html.Syncfusion().ReportViewer("report", (ReportViewerModel)ViewData["ReportModel"]))%> </div> <%= Html.Syncfusion().ScriptManager() %> </body> </html> |
7. Controller information is fine what you have attached.
We have attached the sample in following forum thread.
http://www.syncfusion.com/support/forums/reportviewer-mvc/106896/SSRS-Support?
Please let me know if you have any queries.
Lingaraj S.