Did it grow?

K

Karen

Is there a way of knowing if a subreport is going to grow?

I have a main report with a subreport. The subreport can grow. If it grows
enough that it will not fit on the first page, I'd like to force a page
break but I can't find a property to use to indicate whether the subreport
is going to grow past a certain size.
 
A

Allen Browne

Access does not expose that information to you.

However, if you place the subreport into its own section, and set the
section's Keep Together property to Yes, the entire section will move onto
the next page if it will not fit.

In the main report's Sorting'n'Grouping box, create a section to hold the
subreport. If you want the subreport for evey record in the main report, you
might use the primary key value.
 
K

Karen

Allen,

When I look at the Sorting and Grouping box I see the main form fields but I
don't see any way to create a new section............and the Help files
certainly don't help either. Maybe a little more specific advice about
creating a separate section for the subreport?
 
M

Marshall Barton

Karen said:
Is there a way of knowing if a subreport is going to grow?

I have a main report with a subreport. The subreport can grow. If it grows
enough that it will not fit on the first page, I'd like to force a page
break but I can't find a property to use to indicate whether the subreport
is going to grow past a certain size.


No, not really. This kind of situation is usually handled
by using a section's KeepTogether property. If the
subreport is in a section with a bunch of other stuff, then
add the group header and footer to the field that the main
report is sorted by. You can then spread the main report's
detail section's controls across the header, footer and
detail sections so that the subreport is in a section by
itself.
 
A

Allen Browne

Select a field in the Sorting'n'Grouping dialog.
In the lower pane, set the Group Footer property to Yes.
Access adds the new section to the report (below the Detail section).
Put the subreport in there.
 

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