如何在RDLC报告中为文本框编写表达式 [英] How to write expression for textbox in RDLC report

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

问题描述

我有一个rdlc报告。在报告中最后有一个文本框,我希望只在生成多个页面的报告时显示文本框。但是当生成报告时,我不想显示一个页面。如何那样做吗?



我尝试了什么:



i尝试了一些表达似乎不起作用

i have a rdlc report.In the report there is a textbox in the end that textbox i want display only when report is generated with multiple pages.but when the report is generated one pages i do not want to display.How to do that?

What I have tried:

i tried with some expression not seems to work

推荐答案

你好,



打开.rdlc进行编辑后:



1)右键单击要管理的文本框。

2)在上下文菜单中 ,选择文本框属性选项。

3)当属性对话框打开时,选择可见性部分。

4)然后,选择基于表达式显示或隐藏

5)点击 F x 按钮打开表达式编辑器。

6)你的公式应该以 = 符号开头, bool表达式基于内置字段 TotalPages 字段。



请记住,如果表达式返回 true,则表示您正在管理该文本框的可见属性它会保持可见,因此,要隐藏它,你的表达必须返回false。



这是一个基于输入参数的示例:

Hi there,

Once you have open your .rdlc for editing:

1) Right-click the textbox you want to manage.
2) In the context menu, select the Text Box Properties option.
3) When the properties dialog opens, select the Visibility section.
4) Then, select "Show or hide based on expression"
5) Click the "Fx" button to open the Expression Editor.
6) Your formula should start with "=" sign and a bool expression based on the Built-In Fields TotalPages field.

Keep in mind that you are managing that textbox's visible property, if your expression return "true" it will stay visible, therefore, to hide it, your expression must return "false".

Here's an example based on an input parameter:
=Not(CBool(Parameters!VerTasa.Value))



注意:由于传入的值与需要什么,包括 NOT(...)



干杯!


Note: Since the incoming value is the opposite of what's needed, an NOT(...) is included

Cheers!


这篇关于如何在RDLC报告中为文本框编写表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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