显示报告asp mvc项目中的Teleriks失败

时间:2016-04-10 01:10:08

标签: c# asp.net-mvc telerik reportviewer

下午好,我在asp mvc 5中有一个带有剃刀视图的项目,我试图向Teleriks展示一些我做过的报告,并且在Content文件夹中,但却给了我很多问题和错误。

像这样:分析器错误消息:无法加载文件或程序集'Telerik.ReportViewer.WebForms,Version = 7.0.13.220,Culture = neutral,PublicKeyToken = a9d7983dfcc261be'或其依赖项之一。系统找不到指定的文件。

enter image description here

我一直在尝试按照本教程中的步骤进行操作

http://www.telerik.com/blogs/telerik-reporting-in-mvc-sure-it-takes-8-quick-steps-

这是我的web.config,处理程序

<system.webServer> <validation validateIntegratedModeConfiguration="false" /> <handlers> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> <remove name="Telerik.ReportViewer.axd_*"/> <add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type ="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.0.13.220, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode"/> </handlers> </system.webServer> 

部分视图我一直尝试设置失败(我在项目的根目录添加了一个webform asp,aspx可以使用)

<%@ Import Namespace="SSMS_2._0._1.Content" %> <%@ Register assembly="Telerik.ReportViewer.WebForms, Version=7.0.13.220, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %> <%@ Register assembly="Telerik.Reporting, Version=7.0.13.220, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.Reporting" tagprefix="telerik" %> <form id="main" method="post" action=""> <telerik:ReportViewer ID="ReportViewer1" Width="100%" Height="800px" runat="server"> </telerik:ReportViewer> </form> <script runat="server"> public override void VerifyRenderingInServerForm(Control control) { // to avoid the server form (<form runat="server"> requirement } protected override void OnLoad(EventArgs e) { base.OnLoad(e); var instanceReportSource = new Telerik.Reporting.InstanceReportSource(); instanceReportSource.ReportDocument = new Dashboard(); ReportViewer1.ReportSource = instanceReportSource; } </script>

我来到这里并花了好几天寻找解决方案,欢迎任何帮助,谢谢

1 个答案:

答案 0 :(得分:0)

该做什么,是用teleriks工具更新项目,为reportviewer发送了所有必要的资源,但是现在有参数问题,这是关闭这个问题的另一个问题https://stackoverflow.com/questions/36538991/how-to-add-parameters-to-a-reportviewer-telerik-by-code-because-the-wizard-does