[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2249
  • Last Modified:

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...

Regards
0
splanton
Asked:
splanton
  • 2
1 Solution
 
Koen Van WielinkIT ConsultantCommented:
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.
0
 
Aaron TomoskyTechnology 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.
0
 
splantonAuthor Commented:
Nasty 'bend' of SSRS but we have now adopted it as standard. :)
0
 
Koen Van WielinkIT ConsultantCommented:
I thought it was a really clever solution! Will be using that myself next time. Thanks for the tip Aaron.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now