SSRS sometimes page breaks before last line of a group - reporting-services

I'm working on an SSRS report that is generated within our ERP system. I have a tablix group called "Details". The group is 3 lines, and the group and all components within it have the KeepTogether attribute set to True. The issue I'm having is, if there are more than 2 details, the report page breaks and places the last line on the following page, which also begins the next section of the report, which is not a tablix group.
The weird thing requires a little explanation. If there are 1 or 2 details, everything prints on the same page. If there are 3 details, the last line prints on the following page. If there 5 or 6 details, it prints them all on the same page EXCEPT the last line. It's always only that last line that gets pushed to the next page.
I've tried setting the KeepTogether property at all levels, and that doesn't seem to have any effect. I did it through "Advanced Properties" in the row Groups and Column Groups, and I've highlighted the components and modified each and every component to set the KeepTogether proerty to True, all to no avail.

Related

SSRS inserting blank page

I have a main report calling three subreports. The subreports are being grouped together by the CourseID field. Page 1 shows course 1 for the first two reports. The third subpreport is for comments. If course 1 has comments, they will show up on page 2. If there were no comments, page 2 will be first two subreports for course 2.
The problem is that a blank page is showing up on page 2 when there are no comments for the course.
I have a tried grouping the three subreports in two different ways, as shown in the attached image. The attempt 1 is the one displaying the issue I just described. Attempt 2 does not insert a blank page, but it does not page break on the comments subreport either. It adds the comments to the bottom of the 2nd report.
I removed the page break between each group instance in the group properties and tablix properties of the 3rd report because it was not making a difference whether or not I had them anyway.
I also have ConsumeWhitespaceContainer enabled on the main report properties. It adds several more empty pages if set to false.
The width margins on all four reports are calculated with the tablix width figured in. The subreport widths in the main report are wider than the actual subreport width as well. subreport groupings in the main report
Is there a setting I am missing in the design view?

ssrs not want final page break

In a new SSRS 2008 report, I have one main tablix and I will be embedding 5 existing tablixes into the one main tablix. For each row in the main tablix, I will be embedding 1 of the tablixes. There will be one dataset used and the same parameters are used between the 5 existing embedded tablixes. One of the parameters is to allow the user to select report number 1,2,3,4, or 5 which is an integer value. The default will be to select all the reports.
The selection of which reports will be displayed will be from the main tablix on row visibility for each embedded tablix. Each tablix will be set to 'add a page break after'. This works fine except the last page of the last report will always have a final blank page. I basically do not want that final page break to appear.
Thus is there a way to not have the final page break show up? Could I use some kind of condtional page break logic? If there some kind of a way to determine what the highest number report is that is selected and not allow a final page break to occur in that situation. If so, how would you setup that code?
If not, can you tell me a way that will solve this issue and show me the code, show me the screen prints, and or point me to link(s) that will tell me how to solve this problem?
There is two option for page break...One is Start of group and another one is end of group. Tick the start of a group only ...don't select end of a group. Let me know if you need any more help on this...
For each tablix you set "add a page break after", you need to select the tablix and go to Properties pane and expand page break section. Under the page break section you can enter an expression for the Disabled property.
Assuming your SelectReportNumber parameter is single select and Null displays all reports, the expressions for first four tablix should be like:
=IIF(Parameters!SelectReportNumber.Value <> Nothing,True,False)
Last tablix should not have page break in any case.
If you need multi select then you need to modify the expression for determining Max of the parameter and disable that page break only.

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"

Reporting Services: Tablix RepeatColumnHeaders doesn't work on some reports

So I've got various reports that consist of a DataSet rendered in a Tablix... pretty garden variety stuff. There is a property for the Tablix control named RepeatColumnHeaders, which I have set to True for each report in question. The explanation for this property states “Indicates whether column headers are repeated on each page on which part of the data region appear.” Sounds pretty straightforward, but on some reports it works and on others it does not. I can't seem to find what's different about the reports that might affect this. On one report where the headers do repeat, there is some fairly arcane grouping mojo, but in an example where it doesn't work the Tablix only has one level--no grouping. I would expect the multi-nested one to be the problem, not the flat one.
Maybe it's a different problem altogether. I threw together a simple Tablix rendering SELECT * FROM Foo, accepted all the default values, which results in RepeatColumnHeaders being set to False, and lo and behold the column headers do repeat for that report... Grrr.
Any insights greatly appreciated.
It's a bit wonky from what I've managed to dig up. In your grouping pane, select advanced mode, then select your outermost static row. You should then see the "RepeatOnNewPage" property.
Update: finding Advanced Mode:
The comment by #HCL links to the other answer by #user359904, that has the info on how to find and enter Advanced Mode:
Select the tablix
Below the report are "Row Groups" and "Column Groups", all the way to the right of "Column Groups" is a small downward arrow.
Click the arrow, choose Advanced Mode.
I found a solution that works for me. Vinny's answer led me to it.
Thankfully, I didn't have to recreate my tablix. I had three rows that made up my tablix header. I added three rows outside of the highest level group. These rows are not bound to any group. I modified the rows so that they exactly duplicated the header rows I had in my highest level group. I set the KeepWithGroup property to "After" and the "RepeatOnNewPage" property to true for each of these header rows. I tested the report. The header appeared at the top of every page but due to the duplication of the header rows both inside the highest level group and above the highest level group, the header repeated twice at the top of the first page and at every section break. I deleted the header rows in the topmost section and the duplication went away. Headers repeat correctly at the each break of the highest level group and at the top of each page. There are no header rows in the highest level group.
To set KeepWithGroup and RepeatOnNewPage: Select the tablix. In the group box below the design pane, click on the down arrow to the right of the text that reads "Column Groups" and make sure "Advanced Mode" is checked. Click the first static row and set the KeepWithGroup property to "After" and "RepeatOnNewPage" to true. Do that for each of the rows that comprise your header.
Sorry to beernuts for un-marking your response as the answer; I hope you get to keep the rep points.
The plot thickens. In three tests I found a 1:1 correlation between using the wizard to create a report and getting the desired header behavior, as well as between not using the wizard and not being able to achieve the desired behavior. From there I diff'd the rdl files for a working and non-working example and found this element:
<RepeatOnNewPage>true</RepeatOnNewPage>
In the document at:
Report > Body > ReportItems > Tablix > TablixBody > TablixRowHierarchy
> TablixMembers > TablixMember
I added the same to the non-working rdl and the headers started repeating.
I cannot, however, find a setting, property, etc in the designer that toggles this. It does not seem to correspond at all to the obvious properties as described previously. Is it just an artifact of the wizard? Fortunately it's a fairly easy work-around as I couldn't face recreating a dozen reports using the wizard.
Your post is still being used ;) Thank you all. I built upon what you provided to come up with a solution to restore repeating header rows. I did not have to use the Advanced mode, just some insight... I had two title rows outside all row groups with no column groups. Here is what I did to get the two title rows into the tablix header:
Right click on one title row and "Add Group (Column Group)", Parent Group
Group by '1' (this group will later be deleted so it doesn't matter what you put there
Click OK and the a Header row is added.
Merge all columns in the new header row
In the column group pane, right click on group just created and "Delete Group", select box for "group only" important
Now you have header row you can insert row above or below to add more header lines.
Move your title rows into the new header rows and delete your old title rows.
Last... make sure you check the Tablix property to "Repeat Column Headers on each page"
It worked well and easily repeatable (I had many tablixes).
Sincerely, Alan
In your reports where the header doesn't repeat, did you delete the default header row in the tablix at any point? Once I did that, no matter what setting I tried, the header in the tablix wouldn't repeat. I had to re-create the tablix to get it to work.
It's now the year 2014 and I'm running 2012 version and I used your post to solve my problem - one that experienced SSRS developer in our shop didn't know how to solve (I'm just a newbie). Thanks so much for contributing your solution - it seems to be a timeless issue.
I am adding some screenshots from my SSRS 2012 server..
Now, click on the "(Static)" under "Row Groups" and presss F4.
Also read
TechNet - SSRS: How to Repeat Headers on Each Page

How do I shows column headers of main report on each page when subreport renders on more than one pages

I have few subreports in a sql main report(.rdl file) using VS/SSRS 2008.
The subreports start approximately on the middle of the page in the main report detail section. I have one group in main report, shows header information and pass one parameter - ReportID to each subreport.
I also have checked both:
Row Headers – “Repeat header rows on each page” and
Column Headers – “Repeat header columns on each page”
on General tab of Tablix properties of the main report.
If I have few detail lines in the subreport, so that all can be rendered on page one, everything is ok.
If I have more detail lines in the subreport so that it's not possible to print all on one page, the subreport renders from the fist page and moves on to page two, three and so on.
When I have more than one page of data in the subreport, it is also started on page one, and continues renders on second page and so on...
However, it doesn't show the main report's column/row headers on subsequent pages of the subreports?
I've noticed that when next item/ReportID starts in my main report group, it prints column header only on the first page but not any subsequent page and so on...
I also tried to check only ONE, either
Row Headers – “Repeat header rows on each page” OR
Column Headers – “Repeat header columns on each page”
on general tab of Tablix properties of the main report BUT didn’t work?
Any ideas how to print header info on each page when subreport has more than one page data?
Pagination is always fun in SSRS.
Have you looked at the page size/interactive of the subreport? This may stop the subreport paging, but I don't know if it's what you want.
An older article on pagination
And a newer one
Presently I am encountering the same problem. In a previous SSRS report we got it to work by putting our tablix inside a single-cell list item so that the headers were repeated. Now I am working on a different report, and when I try the same thing I'm getting this error:
[rsInvalidDetailDataGrouping] The tablix ‘tablixOpportunitySummary’ has a detail member with inner members. Detail members can only contain static inner members.
I've searched extensively, but this is the only link which indicates an known problem in SSRS. At the time of this post it contained 4 workarounds:
https://connect.microsoft.com/SQLServer/feedback/details/337720/katmai-reporting-services-2008-tablix-control-repeat-column-headers-does-not-work#
A little late, but I think this is what you are looking for:
You need to go to tablix properties > General and check the option Keep header visible while scrolling. Then go to column/row groups in the advanced mode, chose your static row and set the Fixed Data mode to True, Repeat on new page to True and Keep with group to After.
Here is probably the best reference: Here