RDLC 报告在 Visual Studio 2015 更改为 Visual Studio 2017 后停止工作
RDLC report stop working after change Visual Studio 2015 to Visual Studio 2017
我在 Visual Studio 2017 年有一个 AspNet MVC 项目,该项目之前是在 Visual Studio 2015 年开发的。该项目包含许多工作正常的 rdlc 文件直到我编辑了其中一个。现在,当我尝试从编辑过的 rdlc 下载 pdf 时,出现此错误:
The definition of this report is not valid or supported by this
version of Reporting Services. The report definition may have been
created with a later version of Reporting Services, or contain content
that is not well-formed or not valid based on Reporting Services
schemas. Details: The report definition has an invalid target
namespace
'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition'
which cannot be upgraded.
编辑的 rdlc 将其命名空间从 http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition to http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition
更改为
项目是运行net framework 4.6.2,安装了Microsoft.ReportViewer.Runtime.Common.12.0.2402.15 和 Microsoft.ReportViewer.Runtime.WebForms.12.0.2402.15 nuget 包
我在解决方案资源管理器中右键单击 rdlc 文件并选择从服务器替换,它解决了我的问题。我认为 vs 2017 尝试更新架构以使用不同版本的 sql 服务器并获取原始报告定义修复它。也许吧,我不知道,但它对我有用。
我有同样的问题,我解决了卸载 nuget 包 Microsoft.ReportViewer.Runtime.Common 和 Microsoft.ReportViewer.Runtime.WebForms 和安装包 Microsoft.ReportingServices.ReportViewerControl.WebForms.140.340.80。我想强调的是,我必须添加对 System.Windows.Forms 的引用,因为在我用来渲染的 class ReportDataSource
中存在依赖关系我的报告
我在 Visual Studio 2017 年有一个 AspNet MVC 项目,该项目之前是在 Visual Studio 2015 年开发的。该项目包含许多工作正常的 rdlc 文件直到我编辑了其中一个。现在,当我尝试从编辑过的 rdlc 下载 pdf 时,出现此错误:
The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting Services, or contain content that is not well-formed or not valid based on Reporting Services schemas. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded.
编辑的 rdlc 将其命名空间从 http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition to http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition
更改为项目是运行net framework 4.6.2,安装了Microsoft.ReportViewer.Runtime.Common.12.0.2402.15 和 Microsoft.ReportViewer.Runtime.WebForms.12.0.2402.15 nuget 包
我在解决方案资源管理器中右键单击 rdlc 文件并选择从服务器替换,它解决了我的问题。我认为 vs 2017 尝试更新架构以使用不同版本的 sql 服务器并获取原始报告定义修复它。也许吧,我不知道,但它对我有用。
我有同样的问题,我解决了卸载 nuget 包 Microsoft.ReportViewer.Runtime.Common 和 Microsoft.ReportViewer.Runtime.WebForms 和安装包 Microsoft.ReportingServices.ReportViewerControl.WebForms.140.340.80。我想强调的是,我必须添加对 System.Windows.Forms 的引用,因为在我用来渲染的 class ReportDataSource
中存在依赖关系我的报告