Link to home
Start Free TrialLog in
Avatar of NickMalloy
NickMalloyFlag for United States of America

asked on

Hide a textbox based on a Parameters value

I am trying to hide a textbox based on a report parameters value. Currently I have my code as =IIF(Parameters!HasAccess.Value = "ok1", True, False). The problem is the value for HasValue is actually "ok", but the textbox is still showing up. What am I doing wrong?
=IIF(Parameters!HasAccess.Value = "ok1", True, False)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Simone B
Simone B
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NickMalloy

ASKER

That didn't work.
=IIF(Parameters!HasAccess.Value = "ok", False, True)

The Textbox should be visible and it is not. No matter what my value is in the pram
Is the data type of the field char or boolean? It could be that the display is "ok" but if it's a boolean field, the actual value would probably be 1. If that's the case, try this:

=IIF(Parameters!HasAccess.Value = 1,False, True)

It is a char and not a boolean. The value is just text from a database.
Damn case sensativity.
Just to check: Is your IIF statement in the textbox's Properties > Visibility tab > Initial Visibility: Expression ...?