Keep subreports together in Access 2007

D

Dale Fye

I've created a lot of Access reports over the years, but none with as many
subforms as this one. I'm creating a report that has a natural grouping on 1
field (LD_ID). However, this report has about 10 subreports associated with
it, and I want to ensure that each subreport is kept together with all of its
details.

I found some posts that related to this, and have created a bunch of
additional groupings (does anyone besides me prefer the 2003 grouping and
sorting dialog to that in 2007?) based on expressions (=1, =2, =3, =4, ...),
and have put each of the subreports in it's own group header (with keep
together = Yes).

I've configured the first grouping (LD_ID) with two textboxes (LD_ID, and
Title), with the title textbox set to can grow. This grouping is set to
repeat on successive pages, and force a new page before the section.

In the second group header (=1), I have two more text boxes (Desc, and
Narrative). Both of these textboxes are bound to MEMO fields, and are set to
can grow. The groups header properties are set to CanGrow = Yes,
KeepTogether = Yes, Repeat = No, ForceNewPage = None.

In the third group header (=2), I have a subform, which generally only
displays only a couple of lines.

My problem is that during testing, I've found that for some LD_ID values,
the data in the 3rd group header is pushed to a new page, even though the
information in the 2nd group header only extends about 3 or 4 inches from the
top of the page. In other instances the data displays properly.

I thought I saw a correlation between empty "Narrative" textboxes and proper
subform display. So I added some text to the Narrrative field for a couple
of records, and they started moving the 3rd group header to the second page.
But when I went back and deleted the data from those fields, the still
displayed the 3rd group header on the second page, and did so even when I ran
a query set those fields to NULL for a couple of records.

I've checked all of the KeepTogether and ForceNewPage properties on all of
the group headers and footers, as well as the detail section (don't actually
have anything in there at the moment), and they are all set at KeepTogether =
yes, ForceNewPage = None (except the very first group header which has
ForceNewPage set to BeforeSection).

Would greatly appreciate some help here.


--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
M

Marshall Barton

Dale said:
I've created a lot of Access reports over the years, but none with as many
subforms as this one. I'm creating a report that has a natural grouping on 1
field (LD_ID). However, this report has about 10 subreports associated with
it, and I want to ensure that each subreport is kept together with all of its
details.

I found some posts that related to this, and have created a bunch of
additional groupings (does anyone besides me prefer the 2003 grouping and
sorting dialog to that in 2007?) based on expressions (=1, =2, =3, =4, ...),
and have put each of the subreports in it's own group header (with keep
together = Yes).

I've configured the first grouping (LD_ID) with two textboxes (LD_ID, and
Title), with the title textbox set to can grow. This grouping is set to
repeat on successive pages, and force a new page before the section.

In the second group header (=1), I have two more text boxes (Desc, and
Narrative). Both of these textboxes are bound to MEMO fields, and are set to
can grow. The groups header properties are set to CanGrow = Yes,
KeepTogether = Yes, Repeat = No, ForceNewPage = None.

In the third group header (=2), I have a subform, which generally only
displays only a couple of lines.

My problem is that during testing, I've found that for some LD_ID values,
the data in the 3rd group header is pushed to a new page, even though the
information in the 2nd group header only extends about 3 or 4 inches from the
top of the page. In other instances the data displays properly.

I thought I saw a correlation between empty "Narrative" textboxes and proper
subform display. So I added some text to the Narrrative field for a couple
of records, and they started moving the 3rd group header to the second page.
But when I went back and deleted the data from those fields, the still
displayed the 3rd group header on the second page, and did so even when I ran
a query set those fields to NULL for a couple of records.

I've checked all of the KeepTogether and ForceNewPage properties on all of
the group headers and footers, as well as the detail section (don't actually
have anything in there at the moment), and they are all set at KeepTogether =
yes, ForceNewPage = None (except the very first group header which has
ForceNewPage set to BeforeSection).


Make sure you do not have any excess white space in any of
these sections. It may help to set each section's BackColor
to a different color to make it easy to see how much space
each section occupies.

Also check Sorting and Grouping to make sure do not have the
GROUP KeepTogether set.

If you have any code that changes the section Height
property, you have to very careful or it can affect the
whole report.
 

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