HI,
I am trying to create a report that calculates time for a 2 week pay period.
I added my elapsed time field in the report, and production start date.
I added two running totals, one for the first week and one for the second week. The running totals are set to summarize on field elapsed time, evaluate when
({sp_MSI_Payroll2weeks;1.startdate}>=date({?@StartDate}) and {sp_MSI_Payroll2weeks;1.startdate}<=dateadd("d",6,date({?@StartDate})))
and reset on change of field employee code.
For the second week, the formula I used is
({sp_MSI_Payroll2weeks;1.startdate}>=dateadd("d",7,date({?@StartDate})) and {sp_MSI_Payroll2weeks;1.startdate}<=date({?@endDate}))
I did this so that I can figure out overtime for each week, then I added formulas that calculate overtime and regular time for week 1 and formulas that calculate these values for week 2. Then I have two more formulas that calculate accumulated overtime and regular time for the two weeks.
Problem is if an employee takes vacation for the entire week, my summary for the week displays nothing, and because I am using the summary in other formulas, which eventually affect my accumulated overtime and regular time, those two formulas also show nothing.
I would like some advice on how to make the running total show 0.00 if there are no transactions between my start date and end date (I forgot to mention that these are the two parameters that are required for user to input. Start of pay period and end of pay period).
If the employee only takes one day of vacation during one week, the summary adds the transactions that occurred beautifully.
I guess what I am trying to find out is what does Crystal
return when there were no records to add up. I tried if if isnull(#sum)=true then 0.00 else #sum -didn't work
if #sum=0 then 0.00 - didn't work.
Your help is appreciated!
Oh, I got to have this report running by Monday:(