【发布时间】: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”无效,无法升级。
【问题讨论】: