I'm working on a report where I need to find the numbers of hours worked within a specified date range. This report will be used year after year so I'm wanting to declare start and end dates, then create formulas based off those to specify date range.
I've created a formula called Start date for the first week:
WhilePrintingRecords;
Shared DateTimeVar StartDate;
DateTimeVar EndDate;
StartDate := DateTimeValue (2005,02,20);
EndDate := DateTimeValue (2005,02,26);
0
Next I've created a formula for the second week to show hours worked:
WhilePrintingRecords;
DateTimeVar StartDate;
DateTimeVar EndDate;
if {VW_EmpJobs.EndDate} in dateTimeVar StartDate+7 to dateTimeVar EndDate +7
then {VW_EmpJobs.WorkedHours}
else 5555
All I get is 5555 in the details section for each job.
I will eventually create formulas to show hours worked for each week of the year using this formula if I can ever get it figured out.
Any help as to what I'm doing wrong would be appreciated.
Thanks,
Dan
I've created a formula called Start date for the first week:
WhilePrintingRecords;
Shared DateTimeVar StartDate;
DateTimeVar EndDate;
StartDate := DateTimeValue (2005,02,20);
EndDate := DateTimeValue (2005,02,26);
0
Next I've created a formula for the second week to show hours worked:
WhilePrintingRecords;
DateTimeVar StartDate;
DateTimeVar EndDate;
if {VW_EmpJobs.EndDate} in dateTimeVar StartDate+7 to dateTimeVar EndDate +7
then {VW_EmpJobs.WorkedHours}
else 5555
All I get is 5555 in the details section for each job.
I will eventually create formulas to show hours worked for each week of the year using this formula if I can ever get it figured out.
Any help as to what I'm doing wrong would be appreciated.
Thanks,
Dan