Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Count of repeated status? Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
skyliner34
Newbie
Newbie


Joined: 20 Oct 2011
Online Status: Offline
Posts: 18
Quote skyliner34 Replybullet Posted: 21 Oct 2011 at 3:48am
Do you know, that does make perfect sense :)
 
there is another field called Status_History and another called zTmpStatus, but cant say what these relate to as of yet. Further work needed on my part to find out.
 
Thanks for your help to date though, your a star.
IP IP Logged
skyliner34
Newbie
Newbie


Joined: 20 Oct 2011
Online Status: Offline
Posts: 18
Quote skyliner34 Replybullet Posted: 31 Oct 2011 at 1:47am
Bit of an update, I couldnt find a way in Crystal to produce the results I was hoping for, the closest I could come up with was this
 
if ({HPD_HelpDesk.Assign_Time}) > ({HPD_HelpDesk.Resolved_Time}) then "Re-Opened"
 
Its very crude and whilst does sort of 'count' calls that were at a status of Assigned after a resolved entry, it would miss a large number.
 
So after talking to some of our developers I wrote this and added it as the workflow behind a selection field in Remedy (Done in SQL)
 

SELECT case_id FROM hpd_helpdeskhistory h1

WHERE H1.CASE_STATUS = 5

AND EXISTS

(

SELECT 1 FROM hpd_helpdeskhistory h2

WHERE h1.CASE_ID = h2.CASE_ID

AND h2.CASE_STATUS NOT IN (4,5)

AND h2.REQUEST_ID > h1.REQUEST_ID

)

 
Can anyone see a way of making the SQL query a Crystal rpt


Edited by skyliner34 - 31 Oct 2011 at 3:03am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Nov 2011 at 4:16am
you an use it as a crystal command as your data aource
IP IP Logged
skyliner34
Newbie
Newbie


Joined: 20 Oct 2011
Online Status: Offline
Posts: 18
Quote skyliner34 Replybullet Posted: 15 Nov 2011 at 5:22am
Following on from a suggestion earlier from DBlank I started looking into a history table and now have the exact result I was hoping for.
 
Within the Record Selection
 
{HPD_Helpdesk_HelpdeskHistory.Create_Time} = lastfullmonth // Actual helpdesk case create time
and
{HPD_Helpdesk_HelpdeskHistory.Case_Status} = "Resolved" // Case Status at time of update
and
{HPD_Helpdesk_HelpdeskHistory.Case_Type} = "Incident"
 
and in the Group Selection
 
// Find cases that have been saved as "Resolved" more than once
Count ({HPD_Helpdesk_HelpdeskHistory.Case_Status},{HPD_Helpdesk_HelpdeskHistory.Case_ID}) > 1
and
// Filter out duplicates to show each Case ID only once
{HPD_Helpdesk_HelpdeskHistory.Create_Date} = Maximum ({HPD_Helpdesk_HelpdeskHistory.Create_Date},{HPD_Helpdesk_HelpdeskHistory.Case_ID})
IP IP Logged
<< Prev  Page  of 2
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