85590

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

Question:

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

Answer1:

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.

<a href="https://i.stack.imgur.com/pPoYH.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/pPoYH.png" data-original="https://i.stack.imgur.com/pPoYH.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

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.

<a href="https://i.stack.imgur.com/bdPzN.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/bdPzN.png" data-original="https://i.stack.imgur.com/bdPzN.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Select the correct All toggle item, in my case is All1

It will preview the following:

<a href="https://i.stack.imgur.com/9vc5h.gif" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/9vc5h.gif" data-original="https://i.stack.imgur.com/9vc5h.gif" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Let me know if this helps you.

Recommend

  • Pandas Inconsistent date-time format
  • How to project IR image on a 2D plane using OpenCV and PCL
  • No projects found to import
  • TEdit Input Validation on C++ Builder XE8
  • Should I optimize around reads or CPU time in Google App Engine
  • Equivalent of branch..merge for git-push
  • Grid creating extra spacing that I don't want
  • Getting IIS6 to play nice with WordPress Pretty Permalinks
  • Update varbinary(MAX) field in SQLServer 2012 Lost Last 4 bits
  • PHP UTF-8 to GB2312
  • SAVE attribute needed for Fortran variables when only the C_LOC address is returned to a C program?
  • Why cepheus don't send int without quotes to orion?
  • pyodbc doesn't report sql server error
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • Installing Apache MyFaces 2 on WildFly 8.2.0
  • Can you perform a UNION without a subquery in SQLAlchemy?
  • Email verification using google app script and google forms
  • PostgreSQL Query without WHERE only ORDER BY and LIMIT doesn't use index
  • Using jQuery closest() method with class selector
  • PHPUnit_Framework_TestCase class is not available. Fix… - Makegood , Eclipse
  • Array.prototype.includes - not transformed with babel
  • PHP - How to update data to MySQL when click a radio button
  • Counter field in MS Access, how to generate?
  • javascript inside java/jsp code
  • htaccess rewriting URLs with multiple forward slashes
  • Javascript + PHP Encryption with pidCrypt
  • Display Images one by one with next and previous functionality
  • ORA-29908: missing primary invocation for ancillary operator
  • Web-crawler for facebook in python
  • How to get next/previous record number?
  • Why winpcap requires both .lib and .dll to run?
  • A cron job substitute?
  • SQL merge duplicate rows and join values that are different
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • How do you join a server to an Active Directory (domain)?
  • how does django model after text[] in postgresql [duplicate]
  • Cant find why the layout is getting smaller
  • How does Linux kernel interrupt the application?
  • Qt: Run a script BEFORE make
  • Conditional In-Line CSS for IE and Others?