problems generating a report with a date range 
Author Message
 problems generating a report with a date range

Hi, All,

I have a database of tasks to be performed, starting date, and frequency

TASK       START DATE      FREQUENCY
Send Email 01/01/1999      7
Read Mail  01/01/1999      3

And I want to prompt the user for the starting date and ending date,
then loop thru the task list printing the date, and each task to be done
on that date:

START 1/1/1999  END 1/15/1999

To Do List

01/01/1999 send email
01/01/1999 read mail
01/04/1999 read mail
01/07/1999 read mail
01/08/1999 send email
01/10/1999 read mail
01/13/1999 read mail
01/15/1999 send email

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

I know how to read all the records in a file and print out the records
that need to be done on a specific date, but what I can't determine is
how to make the program loop thru all the dates in a range, then loop
thru all the records in the file and print a line in the report if the
task is scheduled to be done on that date.

My program will prompt for the starting and ending date, then print the
records.  Where do I put the date loop???

Any help greatly appreciated.

P.S. I posted a similar message before, but didn't get any useful
responses.  Just a suggestion that didn't work, and can't locate my
original message or the responses I received.

Thanks in advance,

Roger



Sun, 11 Nov 2001 03:00:00 GMT  
 problems generating a report with a date range
Hi Roger!

Quote:
> Where do I put the date loop???

Don't use a date loop, set the report's Filter expression (under the
Report Properties button on the Procedure Properties dialog) to
something like:

"INRANGE(File:Date,StartDate,EndDate)"

-- Craig (The Data Ferret)
Using Virtual Access 4.52 build 277 (32-bit) in Win95
CPD 2.1 / CDD 3.x / C5EE&IC
CPCS CCS CLACom WinEvent CWA
JANUS/Ada 83 95 CLAW
"Do not meddle in the affairs of FERRETS...."



Sun, 11 Nov 2001 03:00:00 GMT  
 problems generating a report with a date range
If date ranging is fundamental to this file's usage, why not add a date key
(probably date within PersonID). You can then range on the dates for a given
user, and only read those records which are within the selection criteria.

In practice, for a TO DO LIST, this is unlikely to be a particularly large
file, so a filter thru the entire file may be perfectly reasonable. OTOH, if
the file overheads aren't large anyway, why not add the key for convenience.

Regards,
Warren Marshall
A-TEK Systems

Quote:

>Hi, All,

>I have a database of tasks to be performed, starting date, and frequency

>TASK       START DATE      FREQUENCY
>Send Email 01/01/1999      7
>Read Mail  01/01/1999      3

>And I want to prompt the user for the starting date and ending date,
>then loop thru the task list printing the date, and each task to be done
>on that date:

>START 1/1/1999  END 1/15/1999

>To Do List

>01/01/1999 send email
>01/01/1999 read mail
>01/04/1999 read mail
>01/07/1999 read mail
>01/08/1999 send email
>01/10/1999 read mail
>01/13/1999 read mail
>01/15/1999 send email

>------------------------

>I know how to read all the records in a file and print out the records
>that need to be done on a specific date, but what I can't determine is
>how to make the program loop thru all the dates in a range, then loop
>thru all the records in the file and print a line in the report if the
>task is scheduled to be done on that date.

>My program will prompt for the starting and ending date, then print the
>records.  Where do I put the date loop???



Mon, 12 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Setting date Range on a report

2. Newbie Question - Report based on range of dates

3. Malfunction in generating word report out of an app (using the report generation toolkit)

4. filtering date and time in report problem

5. Range.generate

6. coding a date range

7. DB Date Range Field Type

8. Help: Need all changes in a date-range

9. CW Browse Template Date Range & ODBC

10. Need help on date range fot sales tax

11. HELP: SQL ODBC date range, 2nd post

 

 
Powered by phpBB® Forum Software