使用 s-s-rS 2017 RDLC 文件创建本地 PDF 报告

Posted

技术标签:

【中文标题】使用 s-s-rS 2017 RDLC 文件创建本地 PDF 报告【英文标题】:Creating Local PDF Report using s-s-rS 2017 RDLC file 【发布时间】:2022-01-18 03:16:25 【问题描述】:

我在尝试从 RDLC 模板创建 PDF 报告时遇到问题。我收到以下错误

1 - "DefinitionInvalidException: The definition of the report 'Reports\rptDeletedCorpCap.rdlc' is invalid"

2 - "ReportProcessingException: The report definition is not valid or supported by this version of Reporting Services. This could be the result of publishing a report definition of a later version of Reporting Services, or that the report definition contains XML that is not well-formed or the XML is not valid based on the Report Definition schema. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded."

这似乎很容易识别,我使用的 DLL 用于旧版本的报告,但我似乎找不到该 DLL 的更新版本

我正在使用 Microsoft.ReportViewer.WebForms.DLL

11.0.2802.16 版本

是否有一个简单的修复方法可以让这个 RDLC 与那个 DLL 一起工作,或者是否有人知道一个更新的报告工具可以让我在控制台应用程序中创建 PDF 输出?

【问题讨论】:

【参考方案1】:

对于遇到此问题的任何人, 我能够通过下载包 Microsoft.ReportViewer.WinForms v15 来解决它。这是最新的并且与 2016 架构兼容,并允许我生成我的 PDF :)

【讨论】:

以上是关于使用 s-s-rS 2017 RDLC 文件创建本地 PDF 报告的主要内容,如果未能解决你的问题,请参考以下文章

使用 s-s-rS 和 ASP.NET 合并以 Pdf 格式生成的报告

s-s-rS/RDLC 计算表达式的小计

VS2017入门 RDLC入门之01

安装vs2017后,RDLC 报表定义具有无法升级的无效目标命名空间

s-s-rS 报告查看器 + ASP.NET 凭据 401 异常

s-s-rS:如何计算仅包含组中最后一项的总和