467,920 Members | 1,186 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,920 developers. It's quick & easy.

Reports: continued page footer

I have a report that's basically a calendar. I need to get a footer
that shows the range of dates on the current page (a start date and end
date). I know how to do that by putting a field in the header and using
some VB code to assign footer values.

What I don't know is how to show the start date on the second and
subsequent pages to reflect the previous page's end date. The dates are
based on a record's date field, so every day of the month is not
accounted for.

--------------------------------------
Example of what I currently have:
(Page 1)
1/1/04 to 2/15/04

(Page 2)
2/20/04 to 2/25/04

(Page 3)
3/2/04 to 4/1/04

--------------------------------------
Example of what I want:
(Page 1)
1/1/04 to 2/15/04

(page 2)
2/15/04 to 2/25/04

(page 3)
2/25/04 to 4/1/04

-------------------------------------

So, the problem is getting page 2 and 3 to start at the previous page's
end date. Any suggestions?

Nov 13 '05 #1
  • viewed: 1605
Share:
3 Replies
John wrote:
I have a report that's basically a calendar. I need to get a footer
that shows the range of dates on the current page (a start date and end
date). I know how to do that by putting a field in the header and using
some VB code to assign footer values.

What I don't know is how to show the start date on the second and
subsequent pages to reflect the previous page's end date. The dates are
based on a record's date field, so every day of the month is not
accounted for.

--------------------------------------
Example of what I currently have:
(Page 1)
1/1/04 to 2/15/04

(Page 2)
2/20/04 to 2/25/04

(Page 3)
3/2/04 to 4/1/04

--------------------------------------
Example of what I want:
(Page 1)
1/1/04 to 2/15/04

(page 2)
2/15/04 to 2/25/04

(page 3)
2/25/04 to 4/1/04

-------------------------------------

So, the problem is getting page 2 and 3 to start at the previous page's
end date. Any suggestions?


I have no idea if this will work but it makes sense it would. Let's say
you add 2 fields; Date1 and Date2 to the page footer. In the OnFormat
event of the report enter something like
Me.Date1 = [DateFrom] 'whatever the FromDate field is called
Me.Date2 = [ToDate]
Nov 13 '05 #2
Salad, there is only one date field in the record...so I'm not sure
what [ToDate] would be referring to. (I'm assuming you thought there
were two date fields in the record: FromDate and ToDate.
Or, maybe I'm just confused a bit??

Nov 13 '05 #3
John wrote:
Salad, there is only one date field in the record...so I'm not sure
what [ToDate] would be referring to. (I'm assuming you thought there
were two date fields in the record: FromDate and ToDate.
Or, maybe I'm just confused a bit??


Yes, I misunderstood. OK...I still think you need some sort of flag.
For example, create a boolean checkbox, invisible, in the header with a
default value of False. Maybe the name is HeaderSet. In the OnFormat
event of the header set HeaderSet to false. Ex:
Me.HeaderSet = False

In the Detail's OnFormat enter
If Not Me.HeaderSet Then
'this will get the beginning date of this page
Me.Date1 = [datefield in detail band]
Me.Headerset = True
Endif
'now get the date. the last one printed in detail will
'be the ending date
Me.Date2 = [datefield in detailband]

Then in the footer have 2 fields; Date1 and Date2. That should print
your date range. If it doesn't work in the OnFormat, change to the OnPrint.

I'm sure there are other ways to do this. This seems easy enough to do.
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Louis | last post: by
1 post views Thread by Great_milenko | last post: by
3 posts views Thread by Lumpierbritches | last post: by
2 posts views Thread by Lumpierbritches | last post: by
1 post views Thread by Alberto | last post: by
reply views Thread by pratik.best | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.