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

Reports: continued page footer

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.