【发布时间】:2020-11-12 23:39:44
【问题描述】:
我想在 rdlc 报告中使用变量名 ReportTitle 的值
我的 C# 代码是:
this.Report1.LocalReport.ReportPath = @"Report1.rdlc";
ReportParameterCollection reportParms1 = new ReportParameterCollection();
reportParms1.Add(new ReportParameter("ReportTitle", "My Report");
this.Report1.LocalReport.SetParameters(reportParms1);
rdlc 代码:
<ReportItems>
<Textbox name="ReportTitle">
<Value>=Parameters!ReportTitle.Value>
</Textbox>
</ReportItems>
我收到异常错误 setParameter()线
例外是“本地报告处理期间发生错误” 内部异常是“报告的定义无效” 内部异常是“文本框的值表达式引用了一个不存在的报表参数
【问题讨论】:
-
仍然有同样的错误