ssrs 2012 suppress page break on last occurance of group

I have a report with groups that require a page break after each group - no problem there!
at the end of the report I need to run a single line subreport.

On the last group I need to suppress the page break to allow the single line subreport data to appear underneath the last group rather than orphaned on it's own page.

I know where to disable the page break GROUP >PageBreak > Disabled > Expression

I cannot work out what expression to use though!

Any ideas would be greatly received...

Who is Participating?
Aaron TomoskyConnect With a Mentor Technology ConsultantCommented:
I put a tiny rectangle before each group and assign it as page break after. Nice little trick. Lets you put the page break wherever you want.
Koen Van WielinkBusiness Intelligence SpecialistCommented:
There are a few options you could try. The simplest one depends on your design. Is it possible to have the page break BEFORE each group rather than after? This would mean that after the last group is generated no more page break would occur.
Alternatively, you could include a counter in your SQL query which counts the total number of groups you will get in the report. This could be more tricky depending on your query and report design. But if you have this, you can create an expression which only adds a page break if the current group count < max group count. Not entirely sure if that would work to be honest, but it's a possibility you could play around with.
splantonAuthor Commented:
Nasty 'bend' of SSRS but we have now adopted it as standard. :)
Koen Van WielinkBusiness Intelligence SpecialistCommented:
I thought it was a really clever solution! Will be using that myself next time. Thanks for the tip Aaron.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.