SSRS Stop group splitting over pages

Jayne Jodrell 1 Reputation point
2020-12-10T12:07:08.257+00:00

Hi, I have a report with a tablix. Within the tablix is a header row and two detail rows which are a group. When I run the report the group splits over 2 pages. I want to keep them together so have made KeepTogether property True on the group but it still splits, I've tried using with combinations of KeepWithGroup on row1 (KeepWithGroupAfter) and KeepWithGroup on row2 (KeepWithGroupBefore) but it still splits over 2 pages. Any ideas/suggestions most welcome.

Thanks

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,784 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,561 Reputation points
    2020-12-11T03:46:41.633+00:00

    Hi @Jayne Jodrell ,
    I am not sure if you have set a "Page break" in this case.
    You can view it in Properties in Row Group below.
    The following is my test:

    1. Create a table (including group: [SalesTerritoryCountry] group by [SalesTerritoryGroup]);
      47186-preview.jpg
    2. Set Page break;
      47188-page-break.jpg
    3. Preview(each page only displays the information of each [SalesTerritoryGroup])。
      47248-preview02.jpg
      Regards,
      Joy

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    What can I do if my transaction log is full?--- Hot issues November
    How to convert Profiler trace into a SQL Server table -- Hot issues November

    1 person found this answer helpful.
    0 comments No comments

  2. Jayne Jodrell 1 Reputation point
    2020-12-11T09:55:15.277+00:00

    Hi @Joyzhao-MSFT 47319-ssrs1.png

    thanks so much for replying. I haven't set a page break as I only want it to break if the group cannot stay together. Here is an example of the group and the resulting output. I want the last 2 lines on page 2 to be forced to go onto page 3 and stay with the header row. I hope that makes sense. Currently the row group intSubjectID_txtSubmitBy_Subjects is set to KeepTogether which I thought would be enough but there's obviously another setting somewhere I'm missing. If you have any other suggestions they would be most welcome.

    Thanks


  3. Joyzhao-MSFT 15,561 Reputation points
    2020-12-14T08:20:56.733+00:00

    Hi @Jayne Jodrell ,
    You could try Set DataElementOutput to output of required group property.
    But from your screenshot, if you didn't have any page breaks. It looks like your report hit page size restrictions so the row went to another page.
    Did you rend the report in PDF ? You could set the page size to a smaller or big size to make the rows in one page. Basically to arrange this kind of groups in pdf could be hard and you need to manually set the Page Size to a fittest number. See : SSRS: Using Page Size and Interactive Size to Manage Printing
    Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    What can I do if my transaction log is full?--- Hot issues November
    How to convert Profiler trace into a SQL Server table -- Hot issues November

    0 comments No comments