Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep Group on One Page using Reporting Services

I created a report as part of a C# application using Reporting Services and I cant find some functionality I am used to seeing in other environments. I believe both MS Access and Crystal reports have an option called "Keep Together" so that you can keep a specific grouping of data on one page instead of the information being split over two pages.

How do I do that using 2005 Reporting Services when my report is rendered locally in a C# app and viewed using the .net report viewer. Essentially, I want to keep all records for a certain year on one page. I am using Visual Studio 2008.

The year is one of the columns and the number of rows for one year is always smaller than a page. My report uses just one table and has an innermost grouping by year and then another outer grouping by client name.

Currently I can fit two years of data on the report, however, if the data starts half way through the first year, then I get the following:

Example:

Page one: 1/2 of 2004 because the data started half way through 04

All of 2005

First half of 2006

Page2: Second Half of 2006

What I would rather do is push all of 2006 to page two.

I am currently using a table for all of the data in the report. There is a keep together option at the Table level, but I need one at the Group level. In this case the Grouping by year.

Any help that can be provided will be much appreciated.

like image 511
JK. Avatar asked May 21 '09 00:05

JK.


People also ask

How do I keep groups together in SSRS?

Select the Column Groups drop down, click "Advanced Mode" and then in Row groups highlight "Details". In Properties under the "Other" section, select "True" for Keep Together. and save.

What is keep together in SSRS?

The keep together property attempts to keep individual rows on the same page, not all the rows. i.e, if you have a detailed row that is filled with content spanning multiple lines, that will still be kept together in the same page when possible.

How do I repeat a header on each page in SSRS?

Right-click the row, column, or corner handle of a tablix data region, and then click Tablix Properties. In Column Headers, select Repeat header columns on each page. Select OK.

What is adjacent group SSRS?

While the adjacent grouping functionality can be used to create separate groupings in the same table. Those groups don't depend on each other. For best understanding, you can refer to links below: Understanding Groups (Report Builder and SSRS) SSRS Groups: Parent Group vs adjacent Above Group.


1 Answers

Please click on a group which you want to keep together in same page under Row Group section. After clicking on the desired group make "Keep Together option as True" in properties section. That's it. It worked for me.

like image 67
Mohan Katkam Avatar answered Oct 23 '22 04:10

Mohan Katkam