简体   繁体   English

在ReportViewer中显示SSRS报表时出现错误

[英]Getting an Error While Displaying SSRS Report in ReportViewer

I am getting an error while Displaying SSRS Report(.rdl) in Report Viewer.The error is like this.. 在报表查看器中显示SSRS报表(.rdl)时出现错误。错误是这样的。

  An error occurred during local report processing.
  The definition of the report 'Main Report' is invalid.
  The report definition is not valid. Details: The report definition has an invalid target            namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which      cannot be upgraded...

I m New in SSRS Report...so Plz help me......... 我是SSRS报告的新手...所以请Plz帮助我.........

It seems like a format versioning issue. 似乎是格式版本问题。 Can you view the report properly directly on SSRS (without the control)? 您可以直接在SSRS上(没有控件)正确查看报告吗?

If so, it probably means that you need to upgrade your ReportViewerControl in your application - VS 2010 has version 10 of the control. 如果是这样,则可能意味着您需要在应用程序中升级ReportViewerControl-VS 2010具有该控件的版本10。

If not, it may mean that the RDL uploaded to SSRS isn't the correct version for your server. 如果不是,则可能意味着上传到SSRS的RDL不是您服务器的正确版本。

Edit You haven't stated whether your app is web or windows - I've assumed web. 编辑您尚未说明您的应用是Web还是Windows-我假设是Web。 What might have happened is that you upgraded your project from VS2008 and it is still referencing V 2008 of the ReportViewer control? 发生了什么事,是您从VS2008升级了项目,但仍在引用ReportViewer控件的V 2008?

Check your app's web.config 检查您应用的web.config

Under <system.web><compilation><assemblies> <system.web><compilation><assemblies>

<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

Under <system.web><compilation><buildProviders> <system.web><compilation><buildProviders>

<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

And you need to make sure that your web project has a reference to v 10 of Microsoft.ReportViewer.Common and Microsoft.ReportViewer.WebForms , and it is set to deploy to your bin directory. 并且,您需要确保您的Web项目引用了Microsoft.ReportViewer.CommonMicrosoft.ReportViewer.WebForms v 10,并且已将其设置为部署到bin目录。

Edit2 编辑2

VS2010 uses Ajax - add in a ScriptManager to your page before the ReportViewer control, or just paste in the following: VS2010使用Ajax-在ReportViewer控件之前将ScriptManager添加到页面中,或仅粘贴以下内容:

<asp:ScriptManager ID="scmForReportViewer" runat="server">
</asp:ScriptManager>

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

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