我正在使用 visual studio 2012 开发 MVC 应用程序。我在我的项目中添加了一个 ascx 页面以放入报表查看器。当我从页面的工具箱中拖放 ReportViewer 组件时,它没有正确显示 ReportViewer 并在其上显示此错误:
无法创 build 计器“Microsoft.Reporting.WebForms.ReportViewer,Microsoft.Reporting.WebForms 版本 10.0.0.0,Culture=natural,PublicKeyToken=b03f5f7f11d50a3a”
我还在项目引用中添加了 Microsoft.ReportViewer.WebForms 程序集。 Visual Studio 2012 中的 reportviewer 有什么问题吗?提前感谢任何帮助。
最佳答案
已解决!
- 我下载并安装了 Report Viewer 2010 版。
- 然后我添加了 Microsoft.ReportViewer.WebForms.DLL 程序集文件
C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91
. - 最后,我将以下行添加到 .ascx 文件中。
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
关于c# - 在设计模式下使用 visual studio 2012 中的报表查看器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16055601/