Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reference the Visible property....

Status
Not open for further replies.

xlbo

MIS
Mar 26, 2002
15,080
GB
AS per the subject, I am trying to make a section or an RS report conditionally be either visible or hidden.

I have a report parameter set up with 2 options that result in a 1 or 0 return value. I am then trying to interrogate this value within the expression setting of the 'Initial State' part of the visible property as follows:

=iif( Parameters!Collapse_State.Value = 1, "Visible","Hidden")

I have also tried:

=iif( Parameters!Collapse_State.Value = 1, 1,0)

but both attempts keep the rectangle visible no matter which option is chosen on the report parameter. I've tested the returned value of the parameter which is indeed 1 or 0 - just looking to get some help referencing the visible property of the rectangle.......

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
....and as always, the very next thing I try after posting a question solves it - true & false are the way to go. For reference, here is the set up I am using

Report Parameter Name: Collapse_State
Value 1 = Open
2 = Collapsed

I have all my common report elements grouped using rectangles and each rectangle has a 'show' button. Each rectangle has the following expression applied to its visible property:

=iif( Parameters!Collapse_State.Value = 1, false, true)

and each 'show' button has the following expression applied to its 'Initial Appearance of the Toggle Item' property:

=iif( Parameters!Collapse_State.Value = 1, false, true)

This gives the user a very nice way of opening up all sections or keeping them closed


Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top