nobile00

asked on

# Crystal Report Calculating Shift Work hours

In a Crystal report I need to calculate Shift Work Hours pulling form a CRM.

One Shift is Monday Wednesday and Thursday 7 am to 7pm I need to calculate the worked hours for those days for each month. In the CRM there are day fields to use not sure how to go about this any suggestions greatly appreciated.

One Shift is Monday Wednesday and Thursday 7 am to 7pm I need to calculate the worked hours for those days for each month. In the CRM there are day fields to use not sure how to go about this any suggestions greatly appreciated.

ASKER

I tried something like that but need to get certain days per shift. I need to calculate hours worked for Monday Wed. and Thurs. so it will show time spent for each service for each employee within the day for the Month

There are a lot of fields available day fields, date fields etc.

There are a lot of fields available day fields, date fields etc.

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

ASKER

Tried If DayofWeek ({wh_time_subitem.date_worked})IN (crSunday, crWednesday, crThursday) then

Calculation Monday, Wednesday, Thursday

Getting an error it wants a ) after crSunday tried a few things but still get the error

Calculation Monday, Wednesday, Thursday

Getting an error it wants a ) after crSunday tried a few things but still get the error

You need to use [ ] not ( ) around the list

The SQUARE brackets [ ] are used for sets of values

mlmcc

The SQUARE brackets [ ] are used for sets of values

mlmcc

ASKER

I tried DayofWeek ({wh_time_subitem.date_worked})IN [crSunday, crWednesday, crThursday] and it returns FALSE.

What I am trying to do is pull all the employees hours for all days but and then calculate their available hours from their shift to calculate their utilization for the week… which is Sunday – Saturday. One shift is Sunday Wed and Thursday hope that makes sense.

What I am trying to do is pull all the employees hours for all days but and then calculate their available hours from their shift to calculate their utilization for the week… which is Sunday – Saturday. One shift is Sunday Wed and Thursday hope that makes sense.

Where did you try DayOfWeek?

If you put that formula in the detail section and got False for every record, that would imply that none of the records had dates on those days. The test itself is really simple. crSunday, etc. are just pre-defined names in CR that correspond to the values for days of the week -- 1 for Sunday, 2 for Monday, etc.

James

If you put that formula in the detail section and got False for every record, that would imply that none of the records had dates on those days. The test itself is really simple. crSunday, etc. are just pre-defined names in CR that correspond to the values for days of the week -- 1 for Sunday, 2 for Monday, etc.

James

ASKER

Sorry for the delay in responding.

It should be a simple as

DateDiff('h',{ShiftStartTi

If that doesn't work what data do you have for the employee work

mlmcc