问题
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?
回答1:
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:


来源:https://stackoverflow.com/questions/21435830/ssrs-add-a-page-break-after-a-specific-group-sql-server-2008-r2