Click here to Skip to main content
15,912,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi,
I have a filed displayed on my report. But I want to make it visible or invisible, depending on user's choice. My form, that initiates the report, contains a check box, the value of the check box is stored in variable, say vrIfChecked.
I want to make the field hidden if the value in the variable is false
can I use something like

VB
if vrIfChecked="Checked" then
txtHeader.visible=true
else
txtHeader.visible=false
endif


If yes, where to write code and how to call it. Please give me complete steps for this.

Thanks a lot.
With best regards,
Furqan
Posted
Updated 7-Feb-11 23:41pm
v4

1 solution

This can be done in the following order:
1. Create a boolean report parameter in your SSRS Report.
2. On the textbox which is to be hiden, right click on it and click on propreties.
3. From there click on Visibility tab.
4. In it select expression and put the following expression:
=Iif(Parameters!Report_Parameter_0.Value = true, True, False)

Replace Report_Parameter_0 with the name of the parameter you declared in the report.
5. Now from the web page, set this variable and it will work for you.

Hope this answer your question.
 
Share this answer
 
Comments
Furqan Sehgal 8-Feb-11 9:32am    
Thanks,
I followed all your steps. I did not get what you mean by step 5.
How to relate this parameter with my checkbox's value stored in the variable?
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900