【发布时间】:2011-06-30 11:24:02
【问题描述】:
我必须修改我们的系统生成的一份报告。 这些报告是使用 RDLC 文件生成的。
我添加了必要的后端来获取新字段“EmployeeName”所需的信息。
//lunchtime report
lunch.Reason = request.SqlDataReaderResult["Reason"].ToString();
lunch.Record_No = (int)request.SqlDataReaderResult["Record_No"];
lunch.Seq = (int)request.SqlDataReaderResult["Seq"];
lunch.EmployeeName = request.SqlDataReaderResult["EmployeeName"].ToString(); // new field
但是当我在我的 rdlc 文件中调用时
"=Fields!EmployeeName.Value"
它会导致错误:
Error 1 The Value expression for the textbox ‘textbox14’ refers to the field ‘EmployeeName’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
我尝试删除数据源并为 RDLC 重新添加它,但它不再出现在数据源列表中。
以前有人遇到过这个问题吗?
【问题讨论】:
标签: c# .net asp.net rdlc report