Solved

ssrs 2012 suppress page break on last occurance of group

Posted on 2014-03-26
4
1,954 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

760 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

20 Experts available now in Live!

Get 1:1 Help Now