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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort Report in the Order of Multi_Valued Parameters

Formula Help

Sort Report in the Order of Multi_Valued Parameters

by  IdoMillet  Posted    (Edited  )
Assume your report accepts into a multi-value parameter called {?Customer_List} several customer numbers.
The report should show the customers in the order they were entered into the parameter.

Sort the report on the following formula, which computes for each Customer Code its position in the parameter value list:
------------------------------------------------------[ignore]
NumberVar i ;
NumberVar N ;

FOR i := 1 TO UBound({?Customer_List}) DO
(
IF {Customer.Customer ID} = {?Customer_List} THEN
(
N := i;
Exit For ;
)
);

N;
[/ignore]
------------------------------------------------------
Cheers,
- Ido
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top