Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Remove the hours outside the working hours Post Reply Post New Topic
Author Message
lello
Newbie
Newbie


Joined: 12 Nov 2010
Location: Lebanon
Online Status: Offline
Posts: 5
Quote lello Replybullet Topic: Remove the hours outside the working hours
    Posted: 30 Apr 2012 at 1:17am
Hi Guys,
 
I need your help please.
 
We have a helpdesk software. I am creating a report where I need to extract the average time for each engineer on a call.
but sometimes we have calls that take more than one day so that the engineer to resolve. But we have an issue here because the working hours are from 8 am to 5 pm only.
 
for example if an engineer start working on the issue at 3 pm & finishes it the next day at 10am, if I do close.time - open.time it gives me 19 hours but in fact the time spent is 3 pm to 5pm & 8 am to 10 am... 4 hours
 
Can someone please guide me how to remove the hours outside the working hours?
 
Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 30 Apr 2012 at 3:32am
you would need to find the nubmer of days that the work was processed on, then subtract 15 hours.  DateDiff will return the number of days, and DateAdd will adjust the value.
 
Since I am not a running totals master, like DBlank, I would say to use shared variables: both to keep a track of the number of entries and to track the total amount of time spent for completing tickets.  Then the average is simple.
 
shared variable formulas tend to come in groups of 3: reset, increment, & display.
reset, usually a group header:
shared numbervar x := 0;
""//hides the reset
 
increment, usually in detail:
shared numbervar x;
 
if something then
  x := x + {table.field};
"" //hides the running total
 
display, usually a group footer:
shared numbervar x;
x
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.