简体   繁体   English

如何解决从VS2010到VS2015的reportviewer问题

[英]How to solve reportviewer from VS2010 to VS2015

I 've searched the answer and trial for half day. 我找了半天的答案和试验。 I am using VS2015 and MS SQL SERVER 2008 R2 that the project was develop in VS2010. 我正在使用VS2015和MS SQL SERVER 2008 R2,该项目是在VS2010中开发的。

however, the error appears, 但是,出现错误,

ASP.NET runtime error: The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer). ASP.NET运行时错误:基类包含“ReportViewer1”字段,但其类型(Microsoft.Reporting.WebForms.ReportViewer)与控件类型(Microsoft.Reporting.WebForms.ReportViewer)不兼容。 please modify the associated registration that is causing ambiguity and pick a new tag prefix 请修改导致歧义的相关注册并选择新的标记前缀

I cannot find reportViewer.Webfor.dll v12.0.0.0. 我找不到reportViewer.Webfor.dll v12.0.0.0。 I've done the following steps/procedures , ReportViewer is still invalid: 我已经完成了以下步骤/程序,ReportViewer仍然无效:
Thanks for helping!! 谢谢你的帮助!!

  1. install reportViewer 2015 runtime, Report Viewer 2010 Redistributable Package 安装reportViewer 2015运行时,Report Viewer 2010可再发行组件包
  2. install SQL server data tool 2015 安装SQL Server数据工具2015
  3. in .aspx, 在.aspx中,

     <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> 
  4. in web.config, 在web.config中,

     <handlers> <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> </handlers> 

I solve my problem. 我解决了我的问题。 you have to delete all old version V10 and add new version v12 of 4 reportviewer.dll. 你必须删除所有旧版本V10并添加新版本v12 of 4 reportviewer.dll。
the path is C:\\Windows\\assembly\\GAC_MSIL\\Microsoft.ReportViewer.Common 路径是C:\\ Windows \\ assembly \\ GAC_MSIL \\ Microsoft.ReportViewer.Common
second, we need to copy those 4 .dll and paste into bin folder in your project. 第二,我们需要复制那些4.dll并粘贴到项目中的bin文件夹中。
Then you can perfectly run your reportviewer 然后,您可以完美地运行您的报表查看器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM