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

Sorting Group by Parameter 1

Status
Not open for further replies.

MJSQA

Technical User
Nov 15, 2001
30
US
I have a table called FACTIVITIES with field ACTTYPE. I only want items from the table where the ACTTYPE is specified by the user in the parameters. Right now I have the user putting in the parameters for ACTTYPE and calling them ACT1, ACT2,...etc. That is working OK. The problem is that I want the groups to be printed in the order of the Parameter. In other words if the first time I run the report and the the user puts in "G" for ACT1 and "L" for ACT2 then the ACTTYPE group should have the first group printed being for "G". If on the other hand they put in "L" first then the first group printed should be "L".

In other words I want the group to be sorted by the order that the parameter fields are put in.
 
When you create or edit your group, instead of ascending order, use specified order, however I do not know how to tie this to the answer(s) to a parameter field, it appears they always use literals. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
I tried going that route, but Specific Order is for literal data as you said. I was not able to get it to use the parameter field or even a formula.
 
try this:

create a formula like the following

@grouping

******************* formula start********************

select {FACTIVITIES . ACTTYPE}
Case {?ACT1} :
"A"
Case {?ACT2} :
"B"
Case {?ACT3} :
"C"
Case {?ACT4} :
"D"

(add as many cases as you have parameters)
Default :
"ZZZ";

******************* formula end********************

Now Group on @grouping. Your values for Acttype will now
be groups according to the choices for the parameter

Just don't use the value of this formula in the report itself...if you wanted your tree directory to be meaningful you might use "A - " + {?ACT1} instead of just "A" in the formula.

hope this helps....Jim
 
Worked Perfectly! Thank you so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top