我在Visual Studio 2017中做了一个报告,在VS 2013和VS 2015中产生错误:
错误119此报告的定义无效或受其支持 此版本的Reporting Services。报告定义可能有 已使用更高版本的Reporting Services创建,或包含 根据报告,格式不正确或无效的内容 服务架构。详细信息:报表定义的目标无效 命名空间 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' 无法升级。 F:\项目\赢 应用程序\ ERP \ ERP \ DiERP \ BIN \调试\报告\库存\ Ar280.rdlc DiERP
有没有办法让VS 2017中的报告与早期版本的VS兼容。
我在文本编辑器中打开文件并进行了更改: http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition
到
http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition
但它在VS中不起作用:
加载设计器时遇到一个或多个错误。错误列在下面。
反序列化失败:名称空间中的元素“报告” 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' 在命名空间中具有无效的子元素“ReportSections” 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'。 预期可能元素列表:'Description,Author,AutoRefresh, DataSources,DataSet,Body,ReportParameters,Code,Width,Page, EmbeddedImages,语言,CodeModules,类,CustomProperties, 变量,DeferVariableEvaluation,ConsumeContainerWhitespace, DataTransform,DataSchema,DataElementName,DataElementStyle' 命名空间 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' 以及命名空间'## other'中的任何元素。第115行,第4位。
答案 0 :(得分:0)
许多人通过告诉人们编辑旧RDLC报告的标题来回答这个问题的各种排列。这是一个可怕的想法。通常,此问题的实现是因为您使用的Microsoft.ReportingServices.ReportViewerControl.WebForms
dll版本与您尝试运行报表的Sql Server / Sql server lite不兼容,原因是:
解决方案是通过nuget升级.dll的版本。 Visual Studio 2017需要在呈现报表的项目中使用版本140.xxx.xx(与Sql Server 2016及以前版本兼容),并确保升级为存储库做贡献的每个人。查找Microsoft.ReportingServices.ReportViewerControl.WebForms.140.340.80
- .dll应该与旧版本的sql server向后兼容(但尚未对其进行测试)。
答案 1 :(得分:-1)
关注该答案 从RDL 2016降级,并记住,如果您在降级后对报告进行了任何更改,则将再次还原到2016