Extend(wide) or Narrow titles by listing them in SSRS 2008

天涯浪子 提交于 2019-12-12 03:36:59

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/35799223/extendwide-or-narrow-titles-by-listing-them-in-ssrs-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!