Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing user parameter "Status" and displaying all detail records

Status
Not open for further replies.

donly1k

MIS
Apr 7, 2005
4
US
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.
 
Hi,
With a selection formula like

{table.status} = {?Status}

and a grouping on {wonum} with {status} and {changedate} in the details


you should get those desired results.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Already tried that and the results were

wonum status changedate
----------------------------------------------------------
1234 INPRG 2011-05-04 08:21:00.000

5678 INPRG 2011-05-04 08:21:00.000
 
Create a formula {@parmdate} like this:

if {table.status} = {?Status} then
{table.changedate}

Go to report->selection formula->GROUP and enter:

maximum({@parmdate},{table.wonum}) =
maximum({table.changedate},{table.wonum})

Note that if you plan any calculations across groups, you should use running totals, as non-group-selected records will still contribute to the more usual inserted summaries.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top