?
Solved

Hide a textbox based on a Parameters value

Posted on 2011-10-27
7
Medium Priority
?
281 Views
Last Modified: 2012-05-12
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

0
Comment
Question by:NickMalloy
  • 4
  • 3
7 Comments
 
LVL 11

Accepted Solution

by:
Simone B earned 1000 total points
ID: 37041076
It looks like what your IIF statement is saying is:

If the parameter has value ok, then Hidden = True, otherwise Hidden = False

Try switiching your True and False
0
 

Author Comment

by:NickMalloy
ID: 37041188
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
0
 
LVL 11

Expert Comment

by:Simone B
ID: 37041301
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)

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:NickMalloy
ID: 37041336
It is a char and not a boolean. The value is just text from a database.
0
 

Author Comment

by:NickMalloy
ID: 37041487
Damn case sensativity.
0
 
LVL 11

Expert Comment

by:Simone B
ID: 37041528
Just to check: Is your IIF statement in the textbox's Properties > Visibility tab > Initial Visibility: Expression ...?
0
 
LVL 11

Expert Comment

by:Simone B
ID: 37041533
:)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month16 days, 21 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question