RDLC report stop working after change Visual Studio 2015 to Visual Studio 2017(将 Visual Studio 2015 更改为 Visual Studio 2017 后 RDLC 报告停止工作)
问题描述
我在 Visual Studio 2017 中有一个 AspNet MVC 项目,该项目之前是在 Visual Studio 2015 中开发的.该项目包含许多 rdlc 文件,在我编辑其中一个之前,它们都运行良好.现在,当我尝试从已编辑的 rdlc 下载 pdf 时,出现此错误:
I have an AspNet MVC project in Visual Studio 2017 that was previously developed in Visual Studio 2015. This project contains many rdlc files that were working fine until I edited one of them. Now, when I try to download the pdf from the rdlc edited I get this error:
此报告的定义无效或不受此支持报告服务的版本.报告定义可能是使用更高版本的 Reporting Services 创建的,或包含内容根据 Reporting Services 格式不正确或无效模式.详细信息:报告定义的目标无效命名空间'http://schemas.microsoft.com/sqlserver/reporting/2016/01/报告定义'无法升级.
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 到 http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition
The rdlc edited changes its namespace from 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 包
The project is running with net framework 4.6.2 and it has installed Microsoft.ReportViewer.Runtime.Common.12.0.2402.15 and Microsoft.ReportViewer.Runtime.WebForms.12.0.2402.15 nuget packages
推荐答案
我遇到了同样的问题,我通过卸载 nuget 包 Microsoft.ReportViewer.Runtime.Common 和 Microsoft.ReportViewer.Runtime.WebForms 并安装包 Microsoft.ReportingServices.ReportViewerControl.WebForms.140.340.80.我想强调我必须添加对 System.Windows.Forms 的引用,因为在我用来呈现报告的类 ReportDataSource
中有一个依赖项
I had the same problem and I solved it uninstalling the nuget packages Microsoft.ReportViewer.Runtime.Common and Microsoft.ReportViewer.Runtime.WebForms and installing the package Microsoft.ReportingServices.ReportViewerControl.WebForms.140.340.80. I would like to highlight that I had to add a reference to System.Windows.Forms because there is a dependency in the class ReportDataSource
that I use to render my reports
这篇关于将 Visual Studio 2015 更改为 Visual Studio 2017 后 RDLC 报告停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 Visual Studio 2015 更改为 Visual Studio 2017 后 RDLC 报告停止工作
基础教程推荐
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 如何激活MC67中的红灯 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01