Print Page | Close Window

HOW TO: record has at least a history of...

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3403
Printed Date: 05 May 2024 at 3:48am


Topic: HOW TO: record has at least a history of...
Posted By: Valmont
Subject: HOW TO: record has at least a history of...
Date 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.



Replies:
Posted By: rahulwalawalkar
Date 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


Posted By: Valmont
Date 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.



Print Page | Close Window