Keep rows together on the same page in ReportViewer (RDLC) - reporting-services

I've created a RDLC report that looks like this:
Basically data is grouped first by Category and then by Subcategory. Then, as you can see from the screenshot, the Details group has multiple rows, since I want to organize data in that "grid-like" layout.
Now, the problem is that I want the following pagination behavior:
The first row of the table ([Category]) should never have a page break after it, in other words: it should always stay together with the second row ([Subcategory])
Same with the second row ([Subcategory]): I never want a page break after it, it should always appear together with the first block of detail rows
The details rows should never be split into multiple pages, so I want all the 9 table rows in the details group to always appear together on the same page
I've been playing around for several hours with the KeepTogether and KeepWithGroup properties of the Row and Column groups, but they mostly seem to have no effect whatsoever. How should I set them to achieve the behavior I want?

Related

SSRS Report Page Break Logic for Groups in a single report

I have created an SSRS table element where we have multiple grouped items like below generated in a Portrait mode.
Problem:
Whenever there are many items in a single group, some items in the group get spilled over to the next page. That is, a page break is applied.
Example,
If there are 3 groups in a table, and 2nd group contains 50 items, 30 are displayed on the first page, page breaks and then the remaining 20 are displayed on the second page and so on until all the remaining groups are displayed. This is a normal scenario which happens by default.
Expected Solution:
What is expected is, if the data region of any of the group spills over to the next page, then the whole group along with the group header needs to be shifted to the next page. The idea is to have the whole data region of the group stay together.
This is like a smart table (group split).
This is dynamic in nature in the sense, where if for a group with less rows, it fits and stays together on a single page, then page break doesn't happen.
I tried multiple options like below but none of them worked.
- Change the Keep Together flag of the Grouped rows and the Data Region to True.
- Add a page break after each row group using the Group properties.
Can someone please let me know if there is at all a way to achieve the smart page break like the one expected above?
You can't do that but there are two ways that you can do.
You can remove paging of SSRS report. to remove Paging by opening property window of report and set InteractiveSize's Height value to 0. it will remove paging of the report
You can repeat your Group header if there to another page as well so that user have idea about this data belongs to which group.

Freeze Column in SSRS report

I know this is been asked a million times and I have done it myself successfully a number of times however better to check than to assume it can't be done in my scenario.
Is it possible to freeze the first detail column where a parent group exists?
I have a parent Group setup which is grouped on 3 columns (in Advanced Mode Row Groups there are 4 columns above the Parent group, the 4th being the first detail row header and 2 static columns between the Group and the Details, the Details being the last column and I have a number of Static Column Groups) and I have right clicked on the Tablix header to view the properties and checked under Row Headers "Keep header visible while scrolling", and it Freezes my 3 columns in my Group only. So now I just want to freeze one more column the first detail column adjacent to the group - is it possible. I have as other posts suggest goto the static column and set the FixedData for scrolling but what Static column, I tried a number of combinations.
I also tried the Fixed Data on the first Column Group however When the "Keep header visible while scrolling is checked it does not compile and when it isn't ticked it freezes vertically and might I add horizontally as well which is just wrong and it scrolls on the first detail column only and not the 3 preceding group columns!!
Answer is to make my first detail column a child group of the existing parent column so now I have 2 levels of grouping and details. Should have thought of that!

Mixing detail rows in the middle of grouped rows

I have a report that need to show rows grouped by some criteria, let's say SubjectId.
But, final report preview need to looks like table below:
Little explanation:
Rows 11 and 12 belongs to group 1, and I need to put those 'Details rows' in the middle of table and after those two columns, I need to continue with group data, and that method would be valid for any group in table.
Everything would be easy if those two details columns are last two columns, but I have problem to get preview from picture if those columns are in the middle.
I'm not sure you can do this.
You could get something similar by just adding your Gender column at the end and then setting the HideDuplicates property of the textbox top True but that will not allow centering etc.
This was the output I got after applying the above.
I've used Category twice just as an illustration (that it belongs inside the row group)

Print all group footer rows on the next page if they won't all fit on the first page

I have a purchase order form in SSRS. It's grouped on the Purchase Order number. There are four rows in the group footer for totals.
Is there a way to keep all rows in the footer together? That is, if all of them won't fit on the page, that all of them will be printed on the next page.
You have two ways of attempting to accomplish this. Using the KeepTogether property for the selected rows or the entire group
Or when SSRS inevitably doesn't do what you want it to do, you can do the ole Rectangle and Textbox trick. Insert a row above the subtotal that is also a group footer. Then insert a rectangle. Once you do this, you can insert a bunch of text boxes and move them freely around and structure them in the same way you had them formatted the 4 separate rows. It would look something like the below. With this way SSRS couldn't split the row onto multiple pages because its all in the same row. For insurance purposes check the KeepTogether box for this row as well.

Multiple tables/tablix depending on query

Is it possible to display dynamic number of tablix(es) in a report?
That is, if we do not know the number of tables/tablixes to be displayed in advance.
The requirement is that all the output tables will have exact same structure (row and column lables, groupings, etc.).
If you are using data from a single data source, you could achieve this result by using a single tablix, having the highest grouping on the item(s) you want to use to break up the tablix and including a page break as part of that grouping.
For now, I found a way to solve it. Created a static row within the top group and set set its RepeatOnNewPaAge=true. Remove the borders, so that it looks like a separate text above the table.
This way, it prints the latest group info at the top (because it is part of the group) and also gets displayed on every page, because it is statc. Cool huh? :-)