SSRS toggle only certain rows - reporting-services

Say I have got a table with two columns:
The first one belongs to the parent row, the second one the child row. With generic data the output might look something like this:
column1 column 2
1
a
b
2
c
d
e
3
f
g
I have set the visibility of the child group (here in column 2) to be toggled by the values in the parent group (which here are in column 1).
E.g., the values "c, d, and e" can be toggled by clicking a + sign next to "2".
Now comes my problem:
I would like to make certain parts of the table disappear. For example, I would like the parent group "3" including the child member "f, g" not to be shown in my table. For this, I would have to set the visibility of the parent as well as the child group to something like
=Fields!Parentgroup.Value=3.
However, when doing so, the first row of group "3" stays visible because of the toggle option.
A possible workaround would be to limit the toggle option only to rows containing certain data - but my researches showed this is not possible.
Any ideas for other workarounds? Any help is greatly appreciated!

If you want to completely remove section 3 from the report, then you could put a filter on the dataset or on the table/matrix. If you want it to toggle, then you have to keep the toggle element visible.

the below links provides an option to remove [+] sign against those rows where details section doesn't contain any data.
SSRS 2008 - How to hide the plus icon in a group visibility toggle cell
how do i hide the toggle image if there is no row when using drilldown

Related

SSRS: Position Matrix Cell at Intermediate Column Grouping Level, and also inside a Row Group

I have an SSRS matrix that has one level of row groups and two levels of column groups. I have a textbox that is positioned inside one of the column groups, and outside of the other one, which is what I want. But I also want this textbox to be positioned inside of a row group.
Basically, I would like #1 in the screenshot below to have a row group associated with it so that #2 is inside that row group.
My goal is to conditionally set the row-visibility for the first row. But "row visibility..." is greyed out. As far as I can tell, the way to get the option is to make sure it's inside of a row group.
The reason I want to set visibility is because the user has the option to show or hide charts, and separately to show or hide data. If the user selects both charts and data, then I don't need the first row because the label for the data can describe the chart as well. But if the user only selects charts, then I need that first row.
If there's another approach outside of minimizing the row height, I'm all ears.
Though I'm still interested in whether this puzzle is even solvable, and if not, why not.
Steps to Repeat
A version of this problem can be repeated as follows:
Insert a new matrix in a report
Just fill in dummy values, such as a blank space, into the "RowGroup1" and "ColumnGroup" "Group On" expressions.
Add a parent group to the column group, and similarly just give it a dummy grouping expression.
Delete the second row of the matrix, via "Delete Rows Only"
You now have a matrix with the same problem. Namely, get the second cell of the first row, to be inside of a row grouping.

how do I hide parent row when child rows expanded?

I have a data set that consists of the gross dollar amount on row 1, 1-n number of rows of various details then a last row that shows the gross dollars minus the various row amounts. I am trying to replicate some expand/collapse functionality used in an internal ASP report page where the initial row is the NET value (collapsed). When expanded, the gross, detail, and net rows show up in a "expand up" action.
I have been able to so far get the parent row to show the NET values when collapsed, but I am trying to find a way to hide the contents of the parent row once expanded so that the NET values are not displayed twice.
Is there some kind of "is hidden" property I can use in an expression to hide the data in the cells? not sure how else I can accomplish this. Any help would be appreciated.
thanks!
The only thing I can think of that might help is inscope(). You can use something along the lines of:
iif(inscope("ChildGroup") = TRUE ...
This will test to see if the current item is within the scope of the grouping, which means that you can test if the current group is expanded or collapsed.
See https://technet.microsoft.com/en-us/library/ms156490(v=sql.100).aspx for more information on inscope().
so after much research it appears this cannot be done thanks to SSRS producing a static report once rendered. The inscope function allowed me to set the initial state of the row, but does not give functionality to update report properties after rendering occurs. my only options would be then to create a second parent group (grand parent?) or insert an action that calls the report over again passing in a hidden parameter.
thank you for your help!
I believe you can do this, but you'll need to make some adjustments.
A. You can't put your gross dollar amount in the row you'll be using to expand/collapse.
B. Don't use group visibility to expand/collapse. You'll need to use row visibility. (This can get tricky and I don't recommend it if you have nested groups. It becomes unmanageable.)
Row 1: Toggle
Row 2: Gross Dollar Amount, default visible
Row 3-n: Various row Dollar Amounts, default hidden;
Set rows 2-n to toggle based on Row 1.
When you the report initially renders, Row 2 will be visible, Row 3n are not. When you toggle, Row 2 will hide, row 3n will be visible.

How can i hide a Column group when I use pagebreak

I have made a matrix report in SSRS with two column groups. I have added one of the column group also in the Row groups to use page break so I can have each column group on a separate page.
And you see in the following pictures the preview of what has happened with the output.
Page One
Page Two
You see that the page break has worked but it doesn’t hide the other column that shouldn’t be present.
Does somebody has a clue how to fix this?
I don't think just adding a page break will hide the column group's visibility. In SSRS, you can set visibility of a column group based on a condition. Right click on the column group, select Group Properties, Select "Visibility", and "Show and Hide Based on Expression".
You could set an expression based on a field or parameter value. For example, if a parameter value is such, the visibility is true, else false. Example:
=IIF(Parameters!"PARAMNAME".Value.Equals(value),false,true)
I would think in your case, if some a field was null or blank, hide the column group. The page break will take care of itself.
I have solved it with the list object in the toolbox.
I have put the matrix in the list and used a page break on the list.

Show/Hide Column Header on Toggle in SSRS

I am working on a requirement that allow me to show columns when a user clicks on "+" (expand a row), and hides the column when a user clicks on "-" collapse a row.
So for example, when all rows are collapsed, report looks like:
When a user click on A to expand the a row in the report, then report should look like
Please note that COL4 only shows up when a row expands.
I have tried to set the visibility properties but the result I am getting like
If I am trying to set the header textbox properties getting an error like.
"toggle item must be the text boxes that share the same scope as hidden item or are in a scope that contains the hidden item, and cannot be contained within the report item unless current grouping scope has a parent"
I am Using Matrix Table
The problem is that clicking on a Col1 toggle will only be able to hide elements contained within your table grouping (which doesn't include the header of your col2) and you will see the error you mention above, "toggle item must be the text boxes that share the same scope...".
You can place a textbox outside of your table area and that will be able to toggle the column visibility, but that would expand the values for all col1 one grouped values and will not be what you are looking for. Unfortunately you cannot do exactly what you are looking for; the best option is the one you show above.

Tablix: blank cells when adding new child column groups

I have a dataset with the following fields:
SampleHour
Value
MeasureType
Line
Header
AggregationON
I've created a tablix with a row group on SampleHour and I'd like to have two adjacent column groups, each having the same grouping hierarchy as follows (from parent to child):
AggregationON > Line > Header > MeasureType
Well when I define the first column grouping structure all works fine: I add a parent column group on AggregationON, then a child group on Line pointing to the AggregationON group and so on.
Then I try to create the second column grouping structure and I proceed like this: I point to AggregationON in the first column group and choose "Add Group->Adjacent Right" and specify AggregationON as the "Group By" parameter. The newly created column group header AggregationON appears just on the same row as the previous AggregationON header as expected.
Then I point to the newly created AggregationON and choose "Add Group->Child Group" and set Line in the "Group By" parameter: this time the Line group header cause tablix to add a new row. On the left of the newly created header appears a blank new row that is impossible to delete.
If I go on creating child groups to build the whole column group structure, each new column child group will add a blank row on the left. That leads to an unacceptable table header with a mix of texts and blank cells like in the attached screenshot. Any suggestion?
(Creating two column groups with the same structure is due to the need to filter out results differently in the two groupings)
When you create the second column group use the "Column Groups" section on the bottom pane. Click the arrow on the first parent group and select Add Group -> Adjacent After.
Then add the child groups normally and you'll end up with something like this:
Now all you have to do is move the Child1 and Child2 to the rows below, and delete the 2 new rows choosing the option Delete rows only and you will have the two groups side by side.
Other way to tackle this problem is to have only one group (since in your case the grouping rules are the same) just create a parent group that groups based on the filters you want to apply:
Group on: =IIf(<filter expression>, "Group1", "Group2")
This is potentially harder because if you have different rules for each group, you have to put them on every single textbox under this new parent group. But at least it should get the result you want.
I had a similar issue. What worked for me was to use "Merge Cells"
Group1....................Group2......................Group3
Group1a.....................................................
.........................Group2a............................
.....................................................Group3a
In example above Group1a merges with blank cells below, Group2a merges with blank above and below, and Group3a merges with blank cells above. Then just resize the row.