Sub reports split over two pages

V

Vayse

Hi
I have a report with about 10 sub reports. I'd like to keep to stop the sub
report having some details down the bottom of one page, and some at the
start of the next page. If it won't fit on the bottom of the page, I'd
rather leave a blank and start at the start of a new page.

I've tried using keep together, with grouping, but it doesn't seem to work
for sub reports.

Thanks
Diarmuid
 
M

Marshall Barton

Vayse said:
I have a report with about 10 sub reports. I'd like to keep to stop the sub
report having some details down the bottom of one page, and some at the
start of the next page. If it won't fit on the bottom of the page, I'd
rather leave a blank and start at the start of a new page.

I've tried using keep together, with grouping, but it doesn't seem to work
for sub reports.


A section's KeepTogether property only applies to the
section and a Groups KeepTogether property applies to the
entire group.

What that boils down to is that you need to put each
subreport in a separate section. To create extra sections
for this purpose, add more groups with Header and Footer
using constant expressions such as =1, =2, =3 and =4
Then drag each subreport to it's own section and set each
section's KeepTogether property. Make sure that all these
sections and subreport controls have their CanGrow and
CanShrink properties set to Yes.
 
V

Vayse

Marshall Barton said:
A section's KeepTogether property only applies to the
section and a Groups KeepTogether property applies to the
entire group.
What that boils down to is that you need to put each
subreport in a separate section. To create extra sections

Thanks, its nearly there, the subreports all stay on a page now.
But this causes another problem. I'll try to explain.
I have 15 subreports. To make things easier to maintain, I put 10 subreports
in rptClientSubA, 5 subreports in rptClientSubB.
Lets call these rptSubA1 to rptSubA10, rptSubB1 to rptSubB5
My top level reports is rptClient.
So, rptClient contains rptClientSubA and rptClientSubB. I want rptSubB1 to
follow straight after rptSubA10, on the same page if there is room.

Using the method you described, I set up the sections in rptClientSubA and
rptClientSubB. 10 is the max groups allowed, so that was fine.

Unfortunately, rptClientSubB will always start on a new page. I'm guessing
this is because of the way the grouping is set up.
As an experiment, I enabled a report footer on rptClientSubA - its always on
a new page. I can't figure out why, I thought it would follow rptSubA10.

I've tried several things, but have not made any progress.
It there anything else I can try?

Thanks
Diarmuid
 
M

Marshall Barton

Vayse said:
Thanks, its nearly there, the subreports all stay on a page now.
But this causes another problem. I'll try to explain.
I have 15 subreports. To make things easier to maintain, I put 10 subreports
in rptClientSubA, 5 subreports in rptClientSubB.
Lets call these rptSubA1 to rptSubA10, rptSubB1 to rptSubB5
My top level reports is rptClient.
So, rptClient contains rptClientSubA and rptClientSubB. I want rptSubB1 to
follow straight after rptSubA10, on the same page if there is room.

Using the method you described, I set up the sections in rptClientSubA and
rptClientSubB. 10 is the max groups allowed, so that was fine.

Unfortunately, rptClientSubB will always start on a new page. I'm guessing
this is because of the way the grouping is set up.
As an experiment, I enabled a report footer on rptClientSubA - its always on
a new page. I can't figure out why, I thought it would follow rptSubA10


You do not need 10 groups for the 10 subreports. Since each
group can have both a header and a footer section, 5 groups
will do it. In addition, you could use SubA's Report
Header, Report Footer and detail sections for a total of 23
separate KeepTogether sections.

OTOH, your use of two subreport's should be fine. Assuming
you do not have any PageBreak controls scattered around the
main report, when you get unexpected page breaks, the first
thing to check is every section's ForceNewPage property.
 
M

Marshall Barton

Glad to hear you are making progress,

Even though I like to be thought of as clever ;-)
I appreciate the complement.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top