Reputation: 7990
I have a table in SSRS 2008 like:
Zone NumOfPeople
Zone1 50
Zone2 30
Zone3 20
What I want is to change the table into:
Zone NumOfPeople
+ AllZones 100
When I click +
sign, I expect to see something like:
Zone NumOfPeople
- AllZones Zone1 50
Zone2 30
Zone3 20
And clicking -
sign should return the table to its first display. So I want to wide or narrow a table by clicking +/- like that. I could not find a related page that tells how to do it. I appreciate if anyone helps me to understand. Thanks!!
Edit1: SQL Query for the table in SSRS:
Select Zone, Count(distinct Person_Id) as NumOfPeople
From myTable
group by Zone
Upvotes: 0
Views: 36
Reputation: 14108
There are plenty examples in the web for toggling expand/collapse actions in SSRS. For your requeriment is necessary to create an additional column that you can cast in the query or hardcode it in the tablix textbox.
My apprach generates the All Zones
group from the query and names the column as All
.
Select 'All Zones' [All],Zone, Count(distinct Person_Id) as NumOfPeople
From myTable
group by Zone
Add a tablix with the following data arrangement.
In Row Groups
right click on the Zone
subgroup (All child group) and select the Group Properties...
in the Visibility
tab set the following settings.
Select the correct All
toggle item, in my case is All1
It will preview the following:
Let me know if this helps you.
Upvotes: 2