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

无人久伴 提交于 2019-12-05 19:57:05

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:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!