By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

Report problem - Long

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Put the sig block directly in the page footer rather than a subreport. Put
the following code in the page footer format event:
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As Integer)
If Page = 1 Then
Reports!NameOfReport.Section(4).Visible = True
Else
Reports!NameOfReport.Section(4).Visible = False
End Sub

The only thing here is that anything else in the page footer will not be
seen on the first page. If that is critical, you could make the sig block
visible on Page 1 and not visible on succeeding pages.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


"Trevor Best" <no****@besty.org.uk> wrote in message
news:42***********************@news.zen.co.uk...
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

Nov 13 '05 #2

P: n/a
Thanks for replying but that would make the page footer only visible on
page 1, the page numbering wouldn't then be on the subsequent pages.
Besides which when I tried it, the footer didn't even appear on page 1
:-\.

The problem seems to be that when returning to page 1, the code isn't
being run.

Nov 13 '05 #3

P: n/a

Trevor
Maybe you could use code in
http://www.lebans.com/lastgroupheaderfooter.htm

David

Nov 13 '05 #4

P: n/a
David Schofield wrote:
Trevor
Maybe you could use code in
http://www.lebans.com/lastgroupheaderfooter.htm


Thanks, I'll give that a go on Monday.

--
This sig left intentionally blank
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.