报告 RDLC,报告数据源现在丢失
我必须修改我们系统生成的一份报告。 这些报告是使用 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 重新添加它,但它不再出现在数据源列表中。
以前有人遇到过这个问题吗?
I have to modify one of the reports that our system produces.
These reports are generated using RDLC files.
I've added the necessary back end to get the info needed for the new field "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
But when i do a call in my rdlc file
"=Fields!EmployeeName.Value"
it causes an error:
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.
I went to try remove the Datasource and re add it for the RDLC, but it is no longer appearing in the list of datasources.
anyone have this issue before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你完成了。当您将 DataReader 重新绑定到报表时,不会出现运行时错误。
You're done. When you rebind your DataReader to the report, you won't have the runtime error.