将 Visual Studio 2015 更改为 Visual Studio 2017 后 RDLC 报告停止工作

2

本文介绍了将 Visual Studio 2015 更改为 Visual Studio 2017 后 RDLC 报告停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我在 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.15Microsoft.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.CommonMicrosoft.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 报告停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

参数计数与调用不匹配?
Parameter count mismatch with Invoke?(参数计数与调用不匹配?)...
2023-11-11 C#/.NET开发问题
26

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

代表如何工作(在后台)?
How delegates work (in the background)?(代表如何工作(在后台)?)...
2023-11-11 C#/.NET开发问题
5

没有 EndInvoke 的 C# 异步调用?
C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)...
2023-11-11 C#/.NET开发问题
2

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14