报表查看器 11 (2012) Visual Studio 2010 [英] ReportViewer 11 (2012) Visual Studio 2010
问题描述
我正在使用 Visual Studio 2010 并且我安装了Microsoft Report Viewer 2012 Runtime",希望能在 SQL 2012 中测试新的报告系统.之后我从我的 Web.config 中清除了对Microsoft.ReportViewer.WebForms"的引用,并且从我的工具箱中删除了 ReportViewer 控件并添加了新版本 11 ReportViewer.
I am using Visual Studio 2010 and I installed "Microsoft Report Viewer 2012 Runtime" hoping to test the new reporting system in SQL 2012. After which I cleared for ref to "Microsoft.ReportViewer.WebForms" from my Web.config and removed the ReportViewer control from my toolbox and added the new version 11 ReportViewer.
我将新控件添加到测试页面,并将此寄存器添加到测试页面:
I added the new control to a testing page and for one it adds this register to the test page:
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
并将这些条目添加到 Web.config:
and it adds these entry to the Web.config:
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
</httpHandlers>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
工具箱中的控件是11版的新增,但系统一直在尝试引用10版.此外,当我尝试编译它时,我收到错误:
The control in the toolbox is the version 11 addition but the system keeps trying to ref the verion 10 edition. Also when I try to compile it I get the error:
The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL'
推荐答案
我想我遇到了完全相同的问题.如果是这样,我的解决方案是删除 web.config 中所有引用 ReportViewer 的条目,然后在 References 中执行相同操作,构建项目,然后在页面中重新添加一个 reportviewer.
I think I had the exact same problem. If so, my solution was to delete all entries in web.config referencing ReportViewer, then do the same in References, build the project and then re-ADD a reportviewer in the page.
web.config 将使用新版本的新处理程序和程序集进行更新.
web.config will update with new handlers and assemblies for the newer version.
这篇关于报表查看器 11 (2012) Visual Studio 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!