Link to home
Start Free TrialLog in
Avatar of eshurak
eshurakFlag for United States of America

asked on

Blank last page when using "Force new Page" in group footer

Hello,

I've got an access 2010 db that is printing an extra blank page at the end.  I'm using "Force new Page" in group footer as each group needs to be on it's own page.  Please help.

Thanks
Avatar of Lucas
Lucas
Flag of Canada image

Check your margin settings.  I usually put them all to 0.25 and then my page width i can go as far as 8.5 in portrait mode.

  Is the last group on it's own page?

Jim.
Avatar of eshurak

ASKER

It's not the margins.  The problem disappears when I don't use "Force new page" after the group.  This is a new problem since upgrading to 2010.
Avatar of eshurak

ASKER

Hi Jim,

The last page is totally blank except for the page header and footer.  The group footer that is set to "Force New Page after" is also set to not visible.
Not 100% sure about 2010...
But try something like this on Format event of the Group footer:

Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
Dim lngKeyPage As Long
lngKeyPage = Pages - 1
    If Page = lngKeyPage Then
        Me.Section("GroupFooter1").ForceNewPage = False
    End If
End Sub


The Report must be opened in "Print Preview" explicitly in order for this to work
Notes:

1. Not really sure, but set the Visible property of the section back to: True
2. If you need a Grand Total then you may have to add a running sum field and hide it on every page but the last (Key) Page...?
3 < I'm using "Force new Page" in group footer as each group needs to be on it's own page. >
To be clear, this setting makes sure that each group "Starts" on a new page, ...it cant force 300 records (if this is how many records a group has) to magically "Fit" on one page.

JeffCoachman
try this,
...the Page count is off by one though...

I'm swamped right now, so if another Expert has time to tweak this, or has a more elegant fix, feel free...
Database76.mdb
ASKER CERTIFIED SOLUTION
Avatar of eshurak
eshurak
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eshurak

ASKER

I hate not giving points to people but I want people who are searching EE in the future to be able to find answers.
<I hate not giving points to people but I want people who are searching EE in the future to be able to find answers.>
Other members searching here should be your only concern.
You solved your own issue and you stated how you did it.
So in this regard, think of yourself as the "Expert" who answered the question.

Good Work

;-)

Jeff