Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: HOW TO: record has at least a history of... Post Reply Post New Topic
Author Message
Valmont
Newbie
Newbie
Avatar

Joined: 29 Jan 2007
Online Status: Offline
Posts: 39
Quote Valmont Replybullet Topic: HOW TO: record has at least a history of...
    Posted: 11 Jun 2008 at 8:01am
Hi all,
 
In the Select Expert, how do I add a certain criterium that sound like:
"Records should have at least a history where field RESULT=DO_LATER, but may have other results (later on) as well"
 
I'll Explain with examples. Here's a single record:
TIME        MACHINEID  RESULT
5-may-2008  mach1      DO_LATER
So far so good. Here's another example:
TIME        MACHINEID  RESULT
5-may-2008  mach1      DO_LATER
6-may-2008  mach1      ALL_DONE
There it is. This "mach1" has a history of "DO_LATER" and therefore I'd like to export all results of "mach1", whatever it did after "DO_LATER".
 
Here's another example:
TIME        MACHINEID  RESULT
5-may-2008  mach1      DO_LATER
6-may-2008  mach1      ALL_DONE
6-may-2008  mach2      ALL_DONE
So "mach1" we are interested in, but not "mach2". It has no history of "DO_LATER".
So we'd like to observe whether machines that will process tasks later actually do that. Perhaps they don't and report an error or even another "DO_LATER" event.
 
I'd be jolly happy if anyone could help me out.
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 12 Jun 2008 at 6:22am
Hi,
 
Create Group on Machine ID,then go to details section right click select x+2 against suppress and write the following code
 
previous({Result}) = {Result}
 
you can suppress GH and GF
 
Thanks Rahul
IP IP Logged
Valmont
Newbie
Newbie
Avatar

Joined: 29 Jan 2007
Online Status: Offline
Posts: 39
Quote Valmont Replybullet Posted: 13 Jun 2008 at 1:06am

Hi Rahul,

Thanks for your post. But it using "previous"  won't work. Look at the following details (observe mach1):

TIME        MACHINEID  RESULT
5-may-2008  mach1      DO_LATER
5-may-2208  mach3      CALIBRATED
5-may-2008  mach1      CALIBRATING
6-may-2208  mach4      MAINTANCE
6-may-2008  mach1      ALL_DONE
6-may-2008  mach2      ALL_DONE
Once again, I'd like to report on what mach1 did after the "DO_LATER" event. Later on, mach1 calibrated itself and finally did all the jobs it needed to do. Both these eventsI need to report on. The function "previous" will fail.
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.