0
votes

I am trying to hide a textbox based on another textbox value in a table. In my ssrs 2013 report, I have a column in a table called EmpExist that returns nothing or text like Emp does not exist. On top of the table I have a textbox called Go To when clicked it will take you to another report. I am trying to hide this textbox based on EmpExist column in the table. I tried the following, setting the visibility of "Go To":

=IIF(ReportItems!EmpExist.Value = "" OR ReportItems!EmpExist.Value IS NOTHING, False, True)

or this:

=IIF(First(Fields!EmpExist.Value, "dataset1") IS NOTHING OR First(Fields!EmpExist.Value, "dataset1") = "", False, True)

The problem is that the Go To textbox will be either visible or hidden regardless of the EmpExist value. If the EmpExist has any value, "Go To" should be hidden, but it is visible. If it does not have any value or nothing, it should display it but it is visible as well. Thanks.

1
So your table which has a column EmpExist will return only 1 row or multiple? If 1 row then either value will come or no value or some text as Emp does not exist. What about multiple rows and multiple values, then what will be the action?Abhishek
Your latter expression should work I prefer using IsNothing() instead of IS NOTHING, but that should also work. Could it be that the value you get from your database is not actually null or empty string but instead contains some other characters for example spaces or newline characters? I would start debuging by just printing out the contents of First(Fields!EmpExist.Value, "dataset1") and see what comes out.Tomi Niemenmaa
The table returns multiple rows, but always the same EmpExist value for an employee id. I ended up using a parameter to check the value of EmpExist and used the expression above (using the parameter instead of the column name) and seems to be working fine. Not sure why I was not able to do it based on textbox value in SSRS 2013. Thanks for your feedback!user2536008

1 Answers

0
votes

I ended up using a parameter to check the value of EmpExist and used the expression above (using the parameter instead of the column name) and seems to be working fine. Not sure why I was not able to do it based on textbox value in SSRS 2013