【问题标题】:DefinitionInvalidException: The definition of the report '' is invalidDefinitionInvalidException:报告''的定义无效
【发布时间】:2017-10-07 17:42:44
【问题描述】:

当我从 Visual Studio 2015 Community 升级到 Visual Studio 2017 Community 时,我的 reportviewer 报告中出现以下错误。

Microsoft.Reporting.WinForms.LocalProcessingException: '本地报告处理过程中发生错误。'

内部异常 DefinitionInvalidException: 报告''的定义无效。

【问题讨论】:

  • 什么是完整的例外?我怀疑某些 NuGet 包丢失了,检查一下。
  • + InnerException {"此报表的定义无效或不受此版本的 Reporting Services 支持。报表定义可能是使用更高版本的 Reporting Services 创建的,或者包含的内容不是根据 Reporting Services 架构,格式正确或无效。详细信息:报表定义的目标命名空间“schemas.microsoft.com/sqlserver/reporting/2016/01/…”无效,无法升级。”} System.Exception {Microsoft.ReportingServices.ReportProcessing.ReportProcessingException}

标签: c# reportviewer


【解决方案1】:

请确认您已安装以下 nuget 包。

对于 Winforms: https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.Winforms/140.340.80

对于 ASP.NET: https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.WebForms/140.340.80/

您可能还需要安装报表设计器:

https://marketplace.visualstudio.com/items?itemName=SqlReportingServices.MicrosoftRdlcReportDesignerforVisualStudio-18001

如果它不起作用,当你得到异常时,在 Visual Studio 调试器中单击“继续”,然后在网页上查看错误详细信息。

【讨论】:

  • 没有安装正确的Winforms nuget包,谢谢!
【解决方案2】:

由于未安装正确的软件包而发生此错误。我已经通过从此链接安装最新的报表查看器控件解决了这个问题

https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.WebForms/150.900.148

【讨论】:

    【解决方案3】:

    对我来说,它已安装,但我忘记了:

    希望对你有帮助。

    【讨论】:

      【解决方案4】:

      我要补充一点,我的原因是报告定义确实无效。

      在某些表达式中存在语法错误。

      修复了 rdlc 文件,错误消失了,有点红鲱鱼,但我会为其他仍在为 2021 年与 microsoft 报告 2005 工作而痛苦的人添加这个答案:D

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-03-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多