SSRS - Add a page break after a specific group - SQL Server 2008 R2

reporting-services

Solution

Since you're using 2008R2, you can set up page breaks in a Tablix to be conditionally enabled/disabled based on an expression - in your case you'd only be enabling it where the State is TX. Here's an example based on your sample Dataset:

I've just created a simple table based on this:

Note that I've added a Report Header to display a page number. Looks as you'd expect without any page breaks applied:

Now, if you select the State group in the Designer and look at the properties, you'll note there is a Page Break section:

I've set the Disabled property to be:

=IIf(Fields!State.Value = "TX", False, True)

i.e. only apply the Page Break for the TX group.

Now we get one Page Break in the report as required:

Problem

Is there a way to add a page break after nth group? I have a table that has two columns and is grouped by states. ``` State | Name MA Sarah Bob NY Jane TX Klein ``` I want the 3rd group (TX), to be on it's own page. How do I add a page break after a specific group?

Original source