2017-05-09 212 views
0

当我从Visual Studio 2015社区升级到Visual Studio 2017社区时,在我的reportviewer报告中出现以下错误。DefinitionInvalidException:报告''的定义无效

Microsoft.Reporting.WinForms.LocalProcessingException:'本地报告处理期间发生错误。'

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

+1

什么是完整的例外?我怀疑有些NuGet包丢失了,请检查它们。 – sachin

+0

+ \t \t InnerException \t {“此报告的定义无效或不受此版本Reporting Services支持。报告定义可能是使用更高版本的Reporting Services创建的,或者包含格式不正确的内容或基于Reporting Services模式无效详细信息:报告定义具有无法升级的无效目标命名空间“http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition”。“} \t System.Exception {Microsoft.ReportingServices.ReportProcessing.ReportProcessingException} –

回答

4

请确认您已安装以下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

如果它不能正常工作,请点击当您收到异常并在Web页面上查看错误详细信息时,请在Visual Studio调试器中“继续”。

+0

未安装正确的Winforms nuget软件包,谢谢! –