SSRS - How to display table after clicking on chart

If we have a requirement to display table only after clicking on chart then follow below steps :

Consider below query is my dataset :


DECLARE @SalesbyMonth TABLE (Months VARCHAR(20),Sales INT,MonthNo INT)
INSERT @SalesbyMonth SELECT 'January',1000,1
INSERT @SalesbyMonth SELECT 'February',100,2
INSERT @SalesbyMonth SELECT 'March',100,3
INSERT @SalesbyMonth SELECT 'April',200,4
INSERT @SalesbyMonth SELECT 'May',500,5
INSERT @SalesbyMonth SELECT 'June',800,6
INSERT @SalesbyMonth SELECT 'July',500,7
INSERT @SalesbyMonth SELECT 'August',100,8
INSERT @SalesbyMonth SELECT 'September',900,9
INSERT @SalesbyMonth SELECT 'October',600,110
INSERT @SalesbyMonth SELECT 'November',100,11
INSERT @SalesbyMonth SELECT 'December',100,12
SELECT * FROM @SalesbyMonth

I have Column chart and table on the report body as shown below :




To display all labels on the X-axis (Horizontal axis) 

To sort labels on X - axis (Horizontal axis) 

Parameter settings is as shown in below images :







 Click on the bars in the chart - > Right-click - > Series properties ... -> Action ->  specify a report  ->  point to the same report and then follow settings as shown below :


Now click on the Table - > Right-click - > Tablix properties - > Visibility - > Show or hide based on an expression :

=iif(Parameters!Control.Value=true,true,false)


Now if we preview the report we will find only the chart being displayed and after clicking on the bars in the chart we will be able to see the table getting displayed.




The above trick to display table after clicking on chart is not my own idea , I found this on 
MSDN SSRS forumn

See Also :





No comments: