In a report footer I have formulas that total fields in the detail
portion
of my report (the report is an invoice). I want the totals to alway be at
the bottom of the page - this works fine if I have enough records to fill
a
page but when I don't the totals appear right underneath the last record.
Is
there a way of having the totals at the bottom of the page (if it's a
multiple page report, I would want the totals at the bottom of the last
page.
Much thanks
Make your report as you normally would with the Page Footer and Report
Footer.
Make sure there is a control set to = [Page] & " of " & [Pages] in the
Page Footer.
Then for each control you wish to display at the bottom of the last
page, place an unbound control where it should display in the PAGE
Footer.
Set each of these controls Visible properties to No.
(Do not disturb the controls you want to normally display at the
bottom of each page.
Next code the Report's Page Footer Format event:
If [Page] = [Pages] Then
[PageFooterControlName1] = [ReportFooterControlName1]
[PageFooterControlName1].Visible = True
' Do the same for each other ReportFooter control you wish to show
in the Page Footer.
End If
If you have other controls in the page footer that you do not wish to
display on the final page, set them to Not Visible in the Page Footer
event.
You must leave enough Page Footer Height to print these controls.
I see no reason you can't stack these controls on top of your regular
page footer controls and turn Visible properties on and off as
required.
Next code the Report Footer's Format event:
Cancel = True
Then code the Report Header Format event:
[PageFooterControlName1].Visible = False
' Do the same for each other ReportFooter control you wish to show
in the Page Footer.
The Report Footer information should display at the bottom of the
report's last page where the Page footer normally does.