Hello all,
I have a Crystal Report v 10 that goes against a FoxPro DB.
The DB has the following three tables:
Table Name: Employee
Columns: emp_pk, emp_first, emp_last
Table Name: SchedBook
Columns: sbk_empfk, sbk_hours, sbk_date
Table Name: VacTime
Columns: vac_empfk, vac_date, vac_hours
I need the number of hours worked(sched_hours), number of vacation hours(vac_hours), employee last name(emp_last) for a given employee for a given duration (sched_date, vac_date between ?startDate and ?EndDate)
I am using the following query to get the data:
SELECT `employee`.`emp_last`, `schedbook`.`sbk_date`, `schedbook`.`sbk_hours`, `vactime`.`vat_date`, `vactime`.`vat_hours`
FROM (`employee` `employee` RIGHT OUTER JOIN `schedbook` `schedbook` ON `employee`.`emp_pk`=`schedbook`.`sbk_empfk`) RIGHT OUTER JOIN `vactime` `vactime` ON `schedbook`.`sbk_empfk`=`vactime`.`vat_empfk`
WHERE `employee`.`emp_last`='Iacobucci' AND (`schedbook`.`sbk_date`>={d '2006-06-11'} AND `schedbook`.`sbk_date`<={d '2006-06-17'})
ORDER BY `employee`.`emp_last`, `schedbook`.`sbk_date`
But when the data comes on the report, everything is triplicated. I have tried all possible combinations of joins but it still doesnt work.
Any help will be highly appreciated.
I have a Crystal Report v 10 that goes against a FoxPro DB.
The DB has the following three tables:
Table Name: Employee
Columns: emp_pk, emp_first, emp_last
Table Name: SchedBook
Columns: sbk_empfk, sbk_hours, sbk_date
Table Name: VacTime
Columns: vac_empfk, vac_date, vac_hours
I need the number of hours worked(sched_hours), number of vacation hours(vac_hours), employee last name(emp_last) for a given employee for a given duration (sched_date, vac_date between ?startDate and ?EndDate)
I am using the following query to get the data:
SELECT `employee`.`emp_last`, `schedbook`.`sbk_date`, `schedbook`.`sbk_hours`, `vactime`.`vat_date`, `vactime`.`vat_hours`
FROM (`employee` `employee` RIGHT OUTER JOIN `schedbook` `schedbook` ON `employee`.`emp_pk`=`schedbook`.`sbk_empfk`) RIGHT OUTER JOIN `vactime` `vactime` ON `schedbook`.`sbk_empfk`=`vactime`.`vat_empfk`
WHERE `employee`.`emp_last`='Iacobucci' AND (`schedbook`.`sbk_date`>={d '2006-06-11'} AND `schedbook`.`sbk_date`<={d '2006-06-17'})
ORDER BY `employee`.`emp_last`, `schedbook`.`sbk_date`
But when the data comes on the report, everything is triplicated. I have tried all possible combinations of joins but it still doesnt work.
Any help will be highly appreciated.