Posts Tagged ‘Report visibility’

SSRS – Dynamic visibility

November 25, 2011 Leave a comment

Dynamic presentation of the report content is one of the mainly used concept and really fun to work on dynamic reports.
Recently, I have got a scenario of presentation of report content based on the user parameter so user has the functionality to view the content of the report bases on analysis
Here, we could see how easy to implement the logic of dynamic visibility of the report
Step 1: Created a simple report based on AdventureWorks database as

Step 2: Created a parameter with allow multiple options as

Step 3: Adding values manually to the parameter and alternatively we could also fetch the data from the database i.e. we used manual approach of parameter values

Step 4: Select the Tablix properties as

Step 5: Go to the visibility option and select initial run options with an expression base. Here the logic of dynamic report as
=IIF(Instr(Join(Paramters!ReportParameter.Value),”1”)>0, false, true)
It will join all the user selection parameters and search for the particular occurrence of the value. If the value occurs it will give the Integer value. If the value return then it will be greater than 1, and the false or true property will set to the expression.

Step 6: Applied the same concept here for the text box, Logic is to show the Title based on the user selection parameter

Step 7: Select the parameter values, the option will become important in further to view the report visibility

Step 8: Repeat same steps 6, 7 for all the remaining Tablix and Text boxes
Run the report by giving the (All) parameter options here we could see the parameter options as
As we selected (All) parameters options we have all the Tablix and Titles in the report

Step 9: Select only “Bikes” parameter then the report visibility has changed to show only the relevant Tablix and Title box

Step 10: Select both “Bikes” and “Component” parameters then the report visibility has changed to show only the relevant Tablix and Title box

Points to consider:
1. The steps 3, 5 and 6 has the complete logic of dynamic visibility and the remaining steps are for the testing of the implemented functionality
2. I have presented the content as simple as the content of the report is not the main consideration
3. I haven’t presented all the steps of Tablix and the parameter development and for additional information on basics of please visit my previous posts archive

Categories: SSRS Tags: