【问题标题】:Invalid namespace in Visual Studio 2017 Set Report ParameterVisual Studio 2017 设置报告参数中的无效命名空间
【发布时间】:2017-05-05 13:16:51
【问题描述】:

我在向报告中添加参数时遇到问题。每当我尝试设置参数时,报告都会显示错误。如果我不添加任何参数,报告工作正常,但没有数据,因为存储过程需要一些参数。这是有错误的部分代码。

prms.Add(new ReportParameter("EndDate", endDate.ToShortDateString()));
prms.Add(new ReportParameter("StartDate", startDate.ToShortDateString()));
reportviewer.viewer.LocalReport.SetParameters(prms);

我在运行项目时收到的错误是:

Microsoft.Reporting.DefinitionInvalidException:报告''的定义无效。 ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:此报告的定义无效或不受此版本的 Reporting Services 支持。报表定义可能是使用更高版本的 Reporting Services 创建的,或者包含基于 Reporting Services 架构格式不正确或无效的内容。详细信息:报告定义的目标命名空间“http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition”无效,无法升级。

【问题讨论】:

    标签: visual-studio-2017


    【解决方案1】:

    安装 nuget 包 Microsoft.ReportingServices.ReportViewerControl.WebForms 版本 14.0.0.0 应该足以解决您的问题

    请注意,安装此 nuget 包将安装适用于 SQL Server 2017 的 CLRTypes

    【讨论】:

      【解决方案2】:

      【讨论】:

      • 感谢您的信息。我把项目交给了另一个人。我不知道他是否修复了它,但是。我会跟他确认的。
      • 在安装这些工具并更改 web.config 后为我工作。
      • 适用于 Visual Studio 的 Rdlc 报表设计器的新链接:marketplace.visualstudio.com/…
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-02
      • 1970-01-01
      相关资源
      最近更新 更多