NickMalloy
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)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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)
=IIF(Parameters!HasAccess.
ASKER
It is a char and not a boolean. The value is just text from a database.
ASKER
Damn case sensativity.
Just to check: Is your IIF statement in the textbox's Properties > Visibility tab > Initial Visibility: Expression ...?
:)
ASKER
=IIF(Parameters!HasAccess.
The Textbox should be visible and it is not. No matter what my value is in the pram