Restricting group expansion in SSRS - reporting-services

I have a requirement where only one grouping may be open at a time, but I was not able to accomplish this with expressions or JavaScript. Any tips/ suggestions are welcome.
Here's a sample image:
http://imgur.com/d4pYWBS

You could create a function which allows you to collapse all the groups at once. Then simply call this function right before you expand the selected group. This will collapse all the groups first and then open the wanted column.
Here is an extremely detailed tutorial explaining how to collapse and/or expand all the groups at once which you can incorporate on the group header without needing to add extra buttons.

Related

SSRS: Remove empty spaces in report

Below is the output I'm getting. Even when all options are collapsed, I have a ton of empty space that I'd love to eliminate. I have tried row visibility and textbox visibility, but those are currently working to keep my expand/collapse working correctly, I believe. I also tried looking in the properties pane (F4) and messing with the CanGrow/CanShrink properties but no luck in changing output.
How do I fix this?
UPDATE: Here is the design view
Undo all the visibility changes you have made, and probably the undo the group expand collapse changes you made so you have a fresh start.. Even better, create the tablix from scratch again.
Then on the row group properties under the main design window, right-click the row group you want to initially hide and choose properties.
On the visibility tab.. Select "Hide" (if you want the rows in this group to be hidden when the report opens). Then Check the box "Display can be toggled by this report item" and choose the name of text box from the parent group that you want to click to expand. For example, if you were hiding the 'day' group, selected the text box that contains your month name (default this will be the same as the field name).
That's it, just those two steps to achieve what you want. You can repeat this process the month group using year as the toggle etc..
Ultimately, I found a solution by using Report Builder to do what I wanted it to do. I was able to get the output by visually confirming the template. What's strange, is that when I created it, I then opened it up in Visual Studio to see how it differed, and there was absolutely no visibility changes. Meaning, no cells or rows had the Hide option checkboxed.
Furthermore, it differs from what I built previously by not having the extra columns within the grouping, and maybe that's where the extra blank space was coming from. But unfortunately, I found no quantifiable explanation to better help others.

SSRS Add Parent Group to Entire Tablix

I've created a table for SSRS to show data for the current quarter, but end users now want to show previous quarters, when appropriate. The request would be simple if it had been given from the start, as I just need to group all of my rows inside of a "Quarter" group. But with the table already created and using multiple mixes of groups and blank rows, I can't figure out how to add Parent Group to the entire existing format. Ideally, the solution would be through the Design view, but I'm thinking it will have to be done by modifying the underlying XML code.
I was able to figure it out by modifying the XML code. I was wanting to add a Parent Row Group, so I found the TablixRowHierarchy tag and essentially mimicked the first TablixMember tag that contained a Group tag. And wrapped all the existing TablixMember tags inside of a new TablixMembers tag.
I assume the same process would apply to column groups, just starting at TablixColumnHierarchy instead.
I ran into other issues, that appear to be limitations regarding the PageName attribute, as I want each Quarter on a different page, but that is unrelated to the original question.
Using the designer, right click on the outer most group and choose add parent group. Adding the group in the XML code is very messy, and not recommended. The added parent group can use a custom expression if needed.

SSRS Stop group in tablix being split across printing pages

I have a tablix in SQL REPORTS (SSRS) that has many grouped items.
It fits roughly 3.5 groupped item per page when printnig, however I dont want the groups to be split up over the 2 pages, I want a pagebreak to happen whenever the group needs to be split.
I dont want to have it 1 group per page either, I know there is an option for that.
At the bottom of the report builder, you will see two boxes, Row Groups and Column Groups. Select the Column Groups drop down, click "Advanced Mode" and then in Row groups highlight "Details". In Properties under the "Other" section, select "True" for Keep Together. and save. This should work.
Note: I know this is old hope this helps people starting out though.
Modifying the property Other -> KeepTogether of the outermost row group desired to keep within a single page worked for me using Report Builder 3.
My KeepTogether values for each Row Group
Notice in my example, KeepTogether is false for table1_Group1. I don't want to keep my entire dataset together. Instead I want to keep only individual groupings of that dataset together.
In order to see the Properties panel, enable the Properties checkbox under the Show/Hide section of the View tab of the Ribbon.
My View settings
Probably the best place to start is the group-level KeepTogether property.
Indicates whether to keep all sections of the data region together on
one page.
I have just worked through 3 similar reports that were all suffering this issue.
It was only when I marked the group row AND the detail row to get the report to force a page break and keep the pages together.
Interestingly, I can then set the DETAIL BACK to false and the report still functions correctly. I have no explanation as to why, but this was repeatable.
I am using SQL Server 2016 Report Builder (the red one)
I tried all options about that. When I have a more difficult group, it sometimes happens, that the group will be split across pages. Even though setting "Keep Together" property to True.
My solution is:
don't use multiple rows
use one row with rectangle
to rectangle import TextBoxes and fill them with expression "=Fields!Column.Value"

Modifying GridView to work with only One group and multiple items within that group

I am trying to customize gridview prebuilt template. By Default it has multiple groups and multiple items within each group.
I only have a single group and multiple items for that group. How can i configure gridview to work with my needs.
Can anyone please let me know of any online resource or any suggestions?
If you only have one group, then really you don't have any groups. My suggestion for you is to use a GridView and do not use grouping. So, don't tell the CollectionViewSource to group your data, since really you are not grouping - you might even just bind to your list directly.
Then the "Group Heading" can be placed in the Header property of the GridView or just above it in the UI if you want. Again, you do NOT have to group in a GridView and it sounds like you don't want to anyway. This does NOT mean you lose any functionality.
Best of luck!

Creating a Directory Listing type Report in SSRS

I was wondering if there was a way to create a directory listing report in ssrs and if so, how would i go about creating it.
I'm mostly familiar with creating tabular and some somewhat complex reports, but nothing like this; so any help would be extremely useful.
Here's a sample of how the report might look.
Thanks!
Addendum: The content on each page needs to be grouped by Department & Sub-Department.
I made a mistake on the sample report; where it says Department Subtitle it should say sub-department.
Here's one way I've seen it done.
For a 3 column look, create 3 tables/list with the same dataset and set visibility for details group to:
=IIF(ROWNUMBER("YourDataSet") mod 3=1,FALSE,TRUE) <--Table1
=IIF(ROWNUMBER("YourDataSet") mod 3=2,FALSE,TRUE) <--Table2
=IIF(ROWNUMBER("YourDataSet") mod 3=0,FALSE,TRUE) <--Table3
I think your problem is an addition to this question here.
I did a simple test that imitates your situation. Here is how to do it:
Set the report to 3 columns via Report properties. Adjusted the width of each column so that they fit in 1 page of paper.
Add a List control to the first column. Put Text Box controls inside with the required data fields. The List control will repeat for each Listing record.
Create groups for Department and Sub-Department via Row Groups pane. Rearrange the groups so that they will appear above the List control.
Right-click on Department group (or Sub-Department group) and add Page Breaks.
Preview (Should get a result pretty close to what you want)