Subreports try and keep together leaving blank spots/pages

Dustin Brooks picture Dustin Brooks · Mar 11, 2009 · Viewed 25.8k times · Source

Reporting Services 2005

My layout is like this:

  • I have the mainreport which contains a table
  • This table has 3 groups it runs by, GrpLevel1, GrpLevel2, GrpLevel3
  • Sub-Reports are added to one of 3 groups and are executed passing that group key to the sub-report

So, a particular sub-report will run at GrpLevel1 and for every level2 it contains, the sub-reports under GrpLevel2 will run.

The problems I'm having are that the sub-reports want to jump to the next page leaving a gapping hole of white-space in the report.

If a sub-report contains a table with a bunch of data and it can not fit on 3/4s of a page (first page on report has report header on top 1/4), it will jump the whole thing to the next page leaving only a header, rather than printing what it can on the first page.

On the table I have "Keep Together" turned off.

I'm at a loss and about ready to set my cube on fire. Insight in to this would be greatly appreciated.

UPDATE ****************THIS HAS BEEN FIXED IN SSRS 2008 R2***********************
It has been fixed with (SQL Server) Reporting Services 2008 R2. You can now toggle the KeepTogether on Sub-Reports. Pagination looks a lot better.

Answer

Nathan picture Nathan · May 4, 2009

Looks like there is no solution to this problem. The bug is aknowleged by microsoft, but its still not fixed in SSRS2008.

From the KB article (http://support.microsoft.com/kb/938943)

This behavior occurs because the Subreport control has an implicit KeepTogether property. By design, the KeepTogether property tries to keep content of a subreport on one page. Because of this behavior, the report engine creates blank space on the main report if the subreport does not fit on the same page as the main report. Then, the report engine creates the subreport on a new page.

The work around that they list is essentially 'don't use subreports'