Link to home
Start Free TrialLog in
Avatar of mgmhicks
mgmhicks

asked on

sorting crystal reports within a formula

I have the following formula that allows to select to field on want to sort on.  That seems to work, however I cant override the default sort.  If its by date then I want descending and ifs by unitid I want ascending order.  Here is the formula that doesnt work when I try and add the sort direction.

If {?SortOrder} = "U" Then
 {TAG_InsuranceReport2;1.UnitId}
Else
  toText({TAG_InsuranceReport2;1.EndDate},"yyyy-MM-dd")

I have tried adding crAscendingOrder at the end of lines then the formula errors out and says its not part of the formula.

thanks
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mgmhicks
mgmhicks

ASKER

Used method 2 worked great.  Thank you!!