Force Report Footing to print at bottom of page

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

Hhi,

I'm using Access on Office XP Pro.

Is there anyway to force the Report Footing (not page footing) to print at
the bottom of the current page.

Currently, the report ends 10 lines into a new page, so the report footing
start printing on line 11.

I would like it to print at the bottom of the page. Is there anyway to do
this?
 
Hhi,

I'm using Access on Office XP Pro.

Is there anyway to force the Report Footing (not page footing) to print at
the bottom of the current page.

Currently, the report ends 10 lines into a new page, so the report footing
start printing on line 11.

I would like it to print at the bottom of the page. Is there anyway to do
this?

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 on the final page footer,
place an unbound control where it should display.
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 where the Page footer normally does.
 
Dennis said:
I'm using Access on Office XP Pro.

Is there anyway to force the Report Footing (not page footing) to print at
the bottom of the current page.

Currently, the report ends 10 lines into a new page, so the report footing
start printing on line 11.


Not easily, but it can be done. Add a top level group (View
- Sorting And Grouping) with footer using a constant
expression such as =1 Don't add anything to this group
footer.

Use code in this group footer's Format event to adjust its
height to fill the page down to where you want the report
footer to be. The code to postion the report footer 9
incehs from the top of the page would be something like:

Const FOOTERPOSITION As Long = 9 * TPI ' 9 inches

Private Sub GroupFooter0_Format(Cancel As Integer,
FormatCount As Integer)
If Me.Top < FOOTERPOSITION Then
Me.Section(6).Height = FOOTERPOSITION - Me.Top
End If
End Sub

I have not experimented with scenarios when there is not
enough room for the report footer on the same page as the
last detail.
 
Fredg,

I don't have or need a page footer, so I do not have one. I'll put in a
page footer with the control set to "[Pages] & " of " & [Pages]" but I'll
have to set it visibilty property to NO. This is a government form and they
will not accept if if the submitted form does not match their form exactly.
This has been a big headache so far.

I'll give it a shot.
 
Fred,

I got it to work, but I simplified the approach. There was not enough room
on the first page to include the report footing. I know I did not what to
print it on page one, but since the Page Footer can not shrink I had to
allocate the full size. So the suggested approach work.

What I did was:
1. Copied the entired report footing to the page footing and include the
Page control.
2. Made the page footing invisible.
3. Deleted the report footing.
4. In the PageFooterSection_Format event, I put the code:
If [Page] = ([Pages] - 1) then
Me.PageFooterSection.Visible = True
end if

I originally had the IF as If [Page] = [Pages] then but the footer was not
being turned on. (I know the code executed because I had a break point in
the code). So I changed the If statement to If [Page] = ([Pages] - 1) and it
worked!

Thanks.
 
Marsh,

I like your approach, but I did it the quick and dirty way (see above).

I'll have to play with your approach and test the senario when there is not
enough room on the detail page to print the report footer.
 
Back
Top