简体   繁体   中英

Report Builder 3 - Hiding multiple text boxes

Have 3 text boxes and only one can be visible based on the field dept ie AAA,BBB and CCC.

Three text boxes txtBodyText_1, txtBodyText_2 , txtBodyText_3

If Field data returns AAA then visible txtBodyText_1 and the others hidden.

If Field data returns BBB then visible txtBodyText_2 and the others hidden

If Field data returns CCC then visible txtBodyText_3 and the others hidden

have used on the visibility hidden text box properties :

txtBodyText_1:

=iif(Dept.value, "EmpDetails")="AAA",true,false)

txtBodyText_2:

=iif(Dept.value, "EmpDetails")="BBB",true,false)

txtBodyText_3:

=iif(Dept.value, "EmpDetails")="CCC",true,false)

Any ideas for a better solution...

If you switch your "=" to "<>" they should work as you intend.

=iif(Dept.value, "EmpDetails")<>"AAA",true,false) 

Note that in the dialogs the property is named Visibility, but in the property window it is named Hidden. True = Hidden, False = Visible.

This equates to if Dept.value <> "AAA", Hide txtBodyText_1, else Show txtBodyText_1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM