44

I have a report in SSRS that contains 12 subreports. After each subreport, I need to insert a page break so that each subreport starts on a new page and doesn't share pages with the other subreports. Does anyone know how to do this? Thanks

MikeTWebb
  • 9,149
  • 25
  • 93
  • 132

7 Answers7

88

I found an answer. Use a Rectangle at the bottom of each SubReport after all Tablixes and other rendering Objects. Then set its "PageBreak" property to "End". When the SubReport is finished with the Tablix and/or other data objects, the Rectangle forces a page break. Also, a cool feature, if the SubReport returns no rows of data, the page break is not rendered. Therefore, no extra page breaks

MikeTWebb
  • 9,149
  • 25
  • 93
  • 132
  • 1
    Just make sure that the rectangle is immediately under the last rendered object, and not at the bottom of the subReport body. Otherwise you will get unnecessary breaks. Also, make the rectangle height very small e.g. 0.01cm, so that the rectangle itself doesn't cause a page break. – DeanOC Sep 06 '18 at 00:58
8

Another solution would be to have the subreports placed inside the rectangles. I would imagine this would help you to better control and organize the layout of the report.

dmedz
  • 191
  • 3
  • 5
  • 14
  • 1
    The issue with this is that if you set a page break on a surrounding rectangle, but the subreport doesn't return any rows, a blank page will be generated. – Josh Noe Jun 18 '14 at 14:39
3

I tried the other answer here but my master report is driven by a dataset so didn't quite work out. This is how I got it to work for me:

1) I put the subreports into different rows on top of same size rectangles inside a Tablix with all the rows belonging to the same row group.

2) I then selected properties of the group, then pagebreak and checked the property pagebreak on between each instance of group.

Chris Stillwell
  • 10,266
  • 10
  • 67
  • 77
John Kattenhorn
  • 839
  • 11
  • 25
2

Just use the "Add page break after" on the General tab of Tablix Properties.

1

I came across the same kind of issue but I was able to overcome by below mentioned way. I created a sub report and placed rectangle inside the sub report (page break option checked before) and placed all my sub report content inside the rectangle. This page break works only if the sub report renders any data if not they will be no page break.

siddharth
  • 19
  • 1
  • I tried this, making sure the subreport content was actually a child of the rectangle and not just overlapping it. The content rendered without a page break, and then there was a blank page. – StackOverthrow Mar 25 '19 at 20:06
0

I have made Many reports with a front Page Summary and Page 2 with the Detail. Use the Tablix for the Page Break Tablix > Properties > PageBreak > BreakLocation > Start / End / ......

Kyle Jardine
  • 13
  • 1
  • 7
  • 1
    The parent report ignores the page break if it's the very first thing in the subreport. You can work around this by positioning the tablix with the page break 0.01in from the top of the subreport body. – StackOverthrow Mar 25 '19 at 20:22
0

Like other answers mention, I used the "Page break before" option on rectangles/tables, but for some reason it would only break the page if it wasn't at the very top of the (sub)report

Conner
  • 352
  • 4
  • 10