|
-
June 3rd, 2009, 12:48 PM
#1
Coding Help with Crystal 11
I am trying to create a report that will show me ticket that are outside of the SLA times. Urgent tickets have a completion SLA of 6hrs and High tickets have a completion time of 4hrs.
The following is the code I have, however the issue seems to be in trying to get crystal to understand the hours. The duration is being printed in minutes, and no matter what variation I use to represent hours it seems to choose what it likes. This code results in two tickets obviouly under the SLA at 11 minutes and 23 minutes showing as out of SLA.
Any suggestions for help would be greatly appreciated.
AssignDuration Formula:
stringvar AssignDuration;
if {ASGNMNT.RESOLUTION} = "Open" then AssignDuration := totext(DateDiff("h", {@Assigned_ACK_DateTime}, CurrentDateTime))
else AssignDuration := totext((datediff ("n", {@AssignDateTime}, {@AssignResolved})));
AssignDuration
SLANotes Formula:
stringvar SLANotes;
if {CALLLOG.PRIORITY} = "1-Urgent" then
(
if {@AssignDuration} < "4" then (SLANotes := "Within SLA")
else SLANotes := "Out of SLA"
)
else
if {CALLLOG.PRIORITY} = "2-High" then
(
if {@AssignDuration} < "6" then (SLANotes := "Within SLA")
else SLANotes := "Out of SLA"
);
SLANotes
Thanks,
Kerry.
"In order to be effective truth must penetrate like an arrow - and that is likely to hurt." 'Posthumous Pieces' by Wei Wu Wei...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|