在设计模式下在Visual Studio 2012中使用报表查看器时出错 [英] Error in using report viewer in visual studio 2012 in design mode

查看:146
本文介绍了在设计模式下在Visual Studio 2012中使用报表查看器时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2012开发MVC应用程序.我已经在项目中添加了一个ascx页面以放入报告查看器.当我从页面的工具箱中拖放ReportViewer组件时,它无法正确显示ReportViewer并在其上显示此错误:

I'm using visual studio 2012 to develop a MVC application. I have added an ascx page to my project to put the report viewer in. When I drag and drop the ReportViewer component from toolbox in the page, It doesn't show the ReportViewer correctly and shows this error on it:

Failed to create designer 'Microsoft.Reporting.WebForms.ReportViewer, Microsoft.Reporting.WebForms version 10.0.0.0, Culture=natural, PublicKeyToken=b03f5f7f11d50a3a'

我还已将Microsoft.ReportViewer.WebForms程序集添加到项目引用"中. Visual Studio 2012中的reportviewer有什么问题吗?如有任何帮助,我们将不胜感激.

I have also added Microsoft.ReportViewer.WebForms assembly to the project References. Is there anything wrong with reportviewer in Visual Studio 2012? Any help is appreciated in advance.

推荐答案

已解决!

  1. 我下载并安装了Report Viewer 2010版本.
  2. 然后我从添加了Microsoft.ReportViewer.WebForms.DLL程序集文件 C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91.
  3. 最后,我在.ascx文件中添加了以下行. <%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
  1. I downloaded and installed Report Viewer 2010 version.
  2. Then I added Microsoft.ReportViewer.WebForms.DLL assembly file from C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91.
  3. And finally I added the following line to the .ascx file. <%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

这篇关于在设计模式下在Visual Studio 2012中使用报表查看器时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆