472,340 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,340 software developers and data experts.

Report problem - Long

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
4 2682
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
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

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

David

Nov 13 '05 #4
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting...
2
by: Tom | last post by:
I have a report where one field tends to be rather lengthly and ends up being several lines long while another field has several short entries. ...
3
by: Karl Roes | last post by:
Hi all, I am after some suggestions on ways to email an errorlog table. I have been working on remote interfaces and would like the users to...
3
by: Paradigm | last post by:
I have a contract document that is about 20 pages long with various data base fields in it. I cannot create an Access report that long so I have had...
1
by: Megan | last post by:
quick summary: i'm having problems trying to group fields in a report in order to calculate percentages. to calculate percentages, i'm comparing...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of...
2
by: brianflannery | last post by:
Greetings! My situation is this. I currently have a database of which in a form displays jpeg pictures (one at a time) which are linked to the db...
3
by: T | last post by:
I'm trying to determine the useage of varioius reports I have. I need the following to occur when a report is opened, get the name of the report,...
14
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.