Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4584756
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:23:57+00:00 2026-05-21T21:23:57+00:00

I have a matrix report in SSRS 2005, and the rows have certain sections.

  • 0

I have a matrix report in SSRS 2005, and the rows have certain sections. Imagine along the left a series of

1    $100
2    $400
3    $150
4    $650
5    $500
6    $400
7    $900

And I want some rows to be able to be hidden. For example, row 7 are totals of row 5 and 6, so I’d want to +/- next to row 7 that will show/hide rows 5 and 6. (Note that I don’t calculate these totals, they were done by an accountant and it is important that I use the values in the database and don’t calculate the totals myself.)

Now I have this “parent/child” relationship in the database, and I could add that as a group on the row

       4  1    $100
       4  2    $400
       4  3    $150
   -   4  4    $650
       7  5    $500
       7  6    $400
   -   7  7    $900

And then I could add the toggle to that first column, BUT I don’t want the values to be subtotaled when they are rolled up. I simply want rows 5/6 to disappear and only show row 7. Kind of new to SSRS so any suggestions would be great.

So with one group toggled:

   +   4  4    $650
       7  5    $500
       7  6    $400
   -   7  7    $900

Other gorup toggled:

   +   4  4    $650
   +   7  7    $900

Etc.

       4  1    $100
       4  2    $400
       4  3    $150
   -   4  4    $650
   +   7  7    $900

How can I accomplish this such that I am not recalculating the parent rows(rows 4 and 7 in this example)?

If there is a free web control that can accomplish this in ASP.NET I’d be glad to hear about it as well. I have a sinking feeling that I’m going to have to write some AJAX myself to accomplish this. I kind of wondered if there was some hack to embed some javascript into the report that could accomplish this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:23:58+00:00Added an answer on May 21, 2026 at 9:23 pm

    Effectively you have two problems:

    1. Report subtotals that come from the database, not calculated
    2. Dynamically hide and expose detail rows

    You can do this with a standard table report, as follows:

    1. Report database subtotals

    You can do this in plain SQL (D is the Detail table and G is the Group table):

    SELECT D.ParentId, D.ChildId, 
    D.Description as DetailDescription, D.Amount AS DetailAmount, 
    G.GroupDescription, G.GroupAmount
    FROM MyTable D INNER JOIN 
        (SELECT ChildId AS GroupId, Max(Description) as GroupDescription, MAX(Amount) AS GroupAmount 
        FROM MyTable 
        GROUP BY ChildId 
        WHERE ChildId IN (SELECT DISTINCT ParentId FROM MyTable)) G ON GroupId = D.ParentId
    WHERE D.ChildId NOT IN (SELECT DISTINCT ParentId FROM MyTable)
    

    So what we are doing is getting all the rows which aren’t subtotals (that is, the rows where the ChildId is not a ParentId) and in the nested select we are also putting the subtotal on every detail line. Now, in the Group on the table, we can simply report the GroupTotal field from our dataset rather than an actual subtotal.

    1. Dynamically hide and expose rows

    Create a group in your table. Here is where you report the GroupTotal just as a field, not as a total (although you could MAX or MIN it if you wanted to).

    Right-click the detail group and click Edit. On the Visibility tab, check the Visibility can be toggled by another report item checkbox and select the textbox name of the first textbox of the group above. Set the Initial Visibility to either Visible or Hidden as required.

    Off the top of my head and untested but you should get the idea.

    Edit to explain layout better (Note: SQL above also edited to show descriptions)

    I’m working with a table here, not a matrix.

    Layout would look like as follows (first column shows what group you are on):

    Table Header                 Parent Id               Child Id   Description                                                    Amount
    Group1 Header   =Fields!ParentId.Value                          =Last(Fields!GroupDescription.Value)   =Max(Fields!GroupAmount.Value)
    Details Group   =Fields!ParentId.Value  =Fields!ChildId.Value   =Fields!DetailDescription.Value            =Fields!DetailAmount.Value
    

    Group1 is set to Group on ParentId, only the header is displayed (no footer) and the ParentId Textbox on that group is called ParentIdGroup. Details Group has “Visibility can be toggled by another item” checked and “Report item” is set to ParentIdGroup.

    I have mocked up this report now and it works as you describe – what looks like subtotals are actually database fields and the description shows on the group row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sparsely populated matrix that's the result of a series of left
just a quick question, if I have a matrix has n rows and m
I have a matrix in SQL reporting and I would like it to print
I have a 30000x14000 sparse matrix in MATLAB (version 7), which I need to
I have a class to parse a matrix that keeps the result in an
I have looked at the SQL Server 2008 feature comparison matrix and it lists
I have several blocks of the following code that each use there own matrix.
I have a program that uses JAMA and need to test is a matrix
I have a script that appends some rows to a table. One of the
Have just started using Google Chrome , and noticed in parts of our site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.