
Create Date array using Date range
I've solved similar problems by using an unrelated table that had all of the
dates as a "driver" and doing each day as a subreport in the group footer.
<< Subject: Create Date array using Date range
Date: Mon, May 5, 2003 2:52 PM
I am having a very difficult time creating a report. I need to
combine 2 current reports.
There are 3 tables: Employee , EmployeeTime, Absence
If the employee clocks in on a particular day then there is a record
created in the EmployeeTime table, if not there is no record in the
Table for this day. If there is a scheduled Absence, but not a clock
in then there is only a record created in the Absence Table for the
day. If the employee clocks in for half a day and has a scheduled
absence for the rest of the day then there is a record for the day in
each Table. If there is no scheduled absence and no clock in then
there is no record at all for the day in either table.
The problem is that I have not been able to combine the information
from the 2 tables into the report. I can't get it to recognize both
tables as equal. It always assumes one has a heiarchy over the other
and will only print dates that match. I have tried using Left Join
instead of Inner Join for joing the tables, but that doesn't work. If
I do not connect the table at all by date, instead only by employee
id, then everything prints out, but record by record and it does not
keep the dates for EmployeeTime and Absence equal in the details.
I think the only way to do this is to create a Date array from the
Date range in my SQL Query. Then I can use this array as a Group and
step through it date by date, printing out the info from each table if
the date matches the arays date.
I know this is confusing, but any info would be much appreciated.
Thanks, Pam >>