I have a report that's fairly simple, page headers and footers, detail
has a subreport in (can vary in length). The customer wanted a signature
block for them, their client and 3rd party. This was no problem, couple
of boxes and labels in the report footer.
Now customer wants this signature block on the foot of page 1 (stoopid
IMO as that implies people read page 1 where at the end implies they
read past page 1 at least).
Anyway to save sizing lots of controls I put the sig block into a
subreport so I have one object to worry about on the report. I put this
in the page footer and I also have a standard footer in a subreport
(with report name and page x of y). I then put some code in the page
footer format event to position the sig block based on if we're on page
1 so it's where it starts from on page 1 but subsequrnty pages squash it
up, make it invisible, move the std footer up and squash the height of
the footer section.
Since putting this code in the number of pages don't calculate in the
subreport (=Report.Parent.Pages) but that's a minor issue, I can force a
calculation using a textbox (=Pages) on the main report.
The problem started when you go to page 2 the items looked like they had
a severe argument with the page footer but page 3 onwards was OK. I put
this down to the fact that the items thought the page footer was big
then it shrunk itself, same problem returning to page 1 after the last
page, the items would overlap the footer.
I thought to solve that by putting the code into the page header event
so that the page footer would grow or shrink before the items were done.
Started out fine, Page 2 looked perfect, the items had made freinds with
the page footer again but the next bit makes no sense to me at all. If I
go to the last page then return to page 1, the items overlap the page
footer again.
The page header code does run on page 1 as the footer grew and the sig
block appeared but the items acted as though the page footer was at it's
small size.
This also happens if I force the =Pages calculation (as that really just
runs the report to the last page then back top page 1 again without
actually displaying it).
Now another odd thing, the report had 213 pages, if I type in say 2000
into the page number it intelligently goes to the last page, I then go
back to page 1 and it's perfect. It's only if I explicitly go to the
last page the problem appears on page 1 (or if I force =Pages calculation)
I can see 2 ways around this if only I knew how to do it <g>
1. Find out why the items on page 1 don't see the page footer in time.
2. Open the report, go to page <far too many>, get the page number and
set the controlsource of my page count accordingly then return to page 1
But I can't seem to find a way of navigating a report in preview mode
programatically.
If only we had a Page 1 footer is different to page 2 onwards footer,
like Word does.
Or if anyone knows how format a report thus:
<-----------------------
Page 1 header
-------------
Item 1
Item 2
Item 3
[Sig Block] < few boxes
-----------
Page Footer
-----------[pgbrk]
Page 2 header
-----------
Item 4
Item 5
Item 6
Item 7
-----------
Page footer
-----------
----------------------->
Baring in mind the items are of variable height so there's no x items
per page that I can calculate.
--
This sig left intentionally blank