Solved

ssrs 2012 suppress page break on last occurance of group

Posted on 2014-03-26
4
1,982 Views
Last Modified: 2014-03-28
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
Comment
Question by:splanton
  • 2
4 Comments
 
LVL 12

Expert Comment

by:Koen Van Wielink
ID: 39957923
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
 
LVL 38

Accepted Solution

by:
Aaron Tomosky earned 500 total points
ID: 39959725
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
 
LVL 2

Author Closing Comment

by:splanton
ID: 39961740
Nasty 'bend' of SSRS but we have now adopted it as standard. :)
0
 
LVL 12

Expert Comment

by:Koen Van Wielink
ID: 39961770
I thought it was a really clever solution! Will be using that myself next time. Thanks for the tip Aaron.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data‚Ķ
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now