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

RDLC report stop working after change Visual Studio 2015 to Visual Studio 2017(将 Visual Studio 2015 更改为 Visual Studio 2017 后 RDLC 报告停止工作)
本文介绍了将 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.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 报告停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)