Group Footer Problem

J

JWeaver

Is there a way to set up a report so that the Group Footer will not print by
itself at the top of the next page? If I set the group to keep together on
one page with the first detail (or to not keep it together on one page),
sometimes, if there is only one or very few detail items, the footer will be
on the next page and I don't want this. I tried telling it to keep together
on one page with the whole group but this will give me lots of blank space on
some pages and is also not what I want.

Thanks for your help!
 
M

Marshall Barton

JWeaver said:
Is there a way to set up a report so that the Group Footer will not print by
itself at the top of the next page? If I set the group to keep together on
one page with the first detail (or to not keep it together on one page),
sometimes, if there is only one or very few detail items, the footer will be
on the next page and I don't want this. I tried telling it to keep together
on one page with the whole group but this will give me lots of blank space on
some pages and is also not what I want.


There is no built in feature to do that.

There is a tricky way to get that effect, but only if the
detail section can not grow or shrink. First add another
text box (named txtGrpCnt) to the group header section and
set its expression to =Count(*)

Then add a text box (named txtLineCnt) to the detail
section. Set its expression to =1 and RunningSum to Over
Group. Also add a Page Break control (named pgEject) at the
very top of of the detail section

Now you can use code in the detail section's Format event:

If Me.txtLineCnt = Me.txtGrpCnt Then
pgEject.Visible = Me.Top + Me.Section(0).Height +
Me.Section(6).Height _
= <paper height> - <bottom margin> -
Me.Section(4).Height
End If

Watch out for line wrapping and replace <paper height> and
<bottom margin> with your page setup values converted to
twips.
 

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