views:

83

answers:

1

Hello all,

I'm stuck since yesterday with a page break problem on reporting services (2008). I've also have to add that I've started to work with reporting a week ago, so I may misunderstand some of its aspects.

Let's say I've got a dataset, holding two fields, namely A and B . To display these data, I've created a table which looks like :

--------------------
| A Header         |
--------------------
| A Value          |
--------------------
| B Header         |
--------------------
| B Value          |
--------------------

All values and headers belongs to the same group.

However, sometimes, when B content is too long, the resulting pdf displays the B header at the bottom on the first page, and its content in the next page.

What I do want, if B Header and B content don't fit on the current page, is to insert a page break before B header, so that the header and the beginning of its content would always be on the same page. Otherwise, I don't want any page break inserted, as both lines would fit on the current page.

Is there a way to do that ? I tried to play with the keep together option without any success, I must have misunderstood how its works...

Thanks.

A: 

I finally found a proper way to do that, so here it is :

I had to use groups, a parent group and several childs details group.

The parent group is grouped according an Id, unique for each (A,B) couple values. As the data comes from a table row, I just added this row id to the dataset.

Then I defined a child detail group for A and its label, and another child details group for B and its label. I updated the KeepTogether property of A and B details group to true, and left the parent group KeepTogether property to false.

And it is working.

Averell