如何设置在VisualStudio中通过表达式报告TextBox可见性?

时间:2021-01-25 08:11:23

I have a simple TextBox in my Precision Design related to a Field in Temporary Table. I need to show this TextBox only If the it value under Temporary Table is pupulated : so if the value field is pupulated (is a string) I show the Text Box , otherwise I don't show the text Box.

我的精密设计中有一个与临时表中的字段相关的简单TextBox。我只需要显示这个TextBox如果在临时表下它的值被填充:所以如果值字段被填充(是一个字符串)我显示文本框,否则我不显示文本框。

I need to set Visibility by Expression :

我需要通过Expression设置Visibility:

如何设置在VisualStudio中通过表达式报告TextBox可见性?

Which is the best way forward over ?

哪个是前进的最佳方式?

Thanks!

谢谢!

1 个解决方案

#1


2  

You can use iif function. Press fx button, here you can writte your code.

你可以使用iif功能。按fx按钮,在这里您可以编写代码。

iif function evaluate a condition and return 1 of 2 options, for example, in your case you need show one value only if exist.

iif函数评估条件并返回2个选项中的1个,例如,在您的情况下,只有存在时才需要显示一个值。

check this code:

检查此代码:

=iif(fields!YourFieldName.value = "", true, false)

if your field is a number

如果你的字段是一个数字

=iif(fields!YourFieldName.value = 0, true, false)

This code evaluate the value of your field and only populate the value if is complete.

此代码评估字段的值,并仅在完成时填充值。

#1


2  

You can use iif function. Press fx button, here you can writte your code.

你可以使用iif功能。按fx按钮,在这里您可以编写代码。

iif function evaluate a condition and return 1 of 2 options, for example, in your case you need show one value only if exist.

iif函数评估条件并返回2个选项中的1个,例如,在您的情况下,只有存在时才需要显示一个值。

check this code:

检查此代码:

=iif(fields!YourFieldName.value = "", true, false)

if your field is a number

如果你的字段是一个数字

=iif(fields!YourFieldName.value = 0, true, false)

This code evaluate the value of your field and only populate the value if is complete.

此代码评估字段的值,并仅在完成时填充值。