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

Choose the sort the direction

Status
Not open for further replies.

SMosley804

Technical User
Oct 15, 2007
44
0
0
US
Crystal Developer v11
DB-IBM DB2


I have a parameter that allows the user to select the column that they want to sort the report. Is there a way to allow them to select the sort direction as well. Right now all of the sorts a being sorted descending and I need to allow the functionality of them being able to choose, asc or desc. Please help!

Thanks!
 
Create two formulas:

if {?SortDirection} = "Ascending" then {table.field}

if {?SortDirection} = "Descending" then {table.field}

Add each to the sort records area, and format the first for ascending, and the second for descending. If the sort direction is not selected, the formula will have not effect on the sorting.

-LB
 
Thanks LBASS! I figured it out not long after I posted. Te solution works great, I was even able to apply to the Group Sort Expert as well to drive the sort direction of both the groups and the details!

I see why you were voted member of the week! Congrats and thanks again :-}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top