I need to pass parameter “status” where the last status is equal to parameter passed and still displaying all status change for the particular wonum.. The statuses are stored in one table(wostatus).
***Example: Parameter Status = “INPRG”
wonum status changedate
----------------------------------------------------------
1234 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
INPRG 2011-05-04 08:21:00.000
5678 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
INPRG 2011-05-04 08:21:00.000
1212 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
CAN 2011-05-04 08:21:00.000
****Expected Results****
wonum status changedate
----------------------------------------------------------
1234 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
INPRG 2011-05-04 08:21:00.000
5678 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.00
INPRG 2011-05-04 08:21:00.000
I am able to do this using SQL, but I'm not sure how to write in crystal. I would prefer to keep everything in Crystal.
Thanks in advance for your help.
***Example: Parameter Status = “INPRG”
wonum status changedate
----------------------------------------------------------
1234 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
INPRG 2011-05-04 08:21:00.000
5678 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
INPRG 2011-05-04 08:21:00.000
1212 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
CAN 2011-05-04 08:21:00.000
****Expected Results****
wonum status changedate
----------------------------------------------------------
1234 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.000
INPRG 2011-05-04 08:21:00.000
5678 WAPPR 2011-05-01 08:55:00.000
APPR 2011-05-03 09:55:00.00
INPRG 2011-05-04 08:21:00.000
I am able to do this using SQL, but I'm not sure how to write in crystal. I would prefer to keep everything in Crystal.
Thanks in advance for your help.