在 RDLC 报告中的一个表达式中使用多个报告项 [英] Use multiple ReportItems in one expression in RDLC Report

查看:45
本文介绍了在 RDLC 报告中的一个表达式中使用多个报告项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在页脚中显示两列的页面总和.为此我在页脚中使用以下表达式

I want to display page wise sum of 2 columns in footer.for that I am using following expression in footer

=Sum(ReportItems!col1.Value) + Sum(ReportItems!col2.Value)

但它给出了以下错误

"textrun 的值表达式引用多个报表项.页眉或页脚中的表达式只能引用一个报表项."

有人知道如何解决这个问题并在页脚中显示页面明智的总和吗?

anybody knows how can I solve this issue and display page wise sum in footer ?

谢谢

推荐答案

以下是解决您问题的简单方法:

Here is simple workaround for your problem:

  1. 在报告正文中添加单个文本框并将其命名为SUM"
  2. 将您的表达式添加到此文本框 =ReportItems!col1.Value + ReportItems!col2.Value
  3. 对于此文本框,将可见性设置为隐藏
  4. 在页脚中使用 =ReportItems!SUM.Value
  5. 引用这个隐藏的文本框
  1. Add single textbox to the body of the report and name it i.e. "SUM"
  2. Add your expression to this textbox =ReportItems!col1.Value + ReportItems!col2.Value
  3. For this textbox set visibility as hidden
  4. In the footer refer to this hidden textbox using =ReportItems!SUM.Value

这篇关于在 RDLC 报告中的一个表达式中使用多个报告项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆