Link to home
Start Free TrialLog in
Avatar of splanton
splantonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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
Avatar of Koen Van Wielink
Koen Van Wielink
Flag of Netherlands image

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.
ASKER CERTIFIED SOLUTION
Avatar of Aaron Tomosky
Aaron Tomosky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of splanton

ASKER

Nasty 'bend' of SSRS but we have now adopted it as standard. :)
I thought it was a really clever solution! Will be using that myself next time. Thanks for the tip Aaron.