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

Sort By Parameter 1

Status
Not open for further replies.

CrystalProgDev

Programmer
Oct 1, 2010
69
US
User want to have a sort by paramter selction by a name aor date.

I came up with a formula
If {?@SortOrder} = 1 Then
{Report;1.Applicant} -- String
Else
CStr({@Date})

@Date is a formula.

When user select date, the data is not getting sorted by date properly. Can anyone help me.

Thank you in advance
 
Change it to:

If {?@SortOrder} = 1 Then
{Report;1.Applicant} -- String
Else
totext({@Date},"yyyy/MM/dd")

-LB
 
ToText ---- Still the same problem. The Date formula has if then else stmt.
 
Sorry, it is working....
How to have sort order - name ascending and date descending in this case?
 
Create two separate formulas and add them to your record sort:

//{@App} - specify ascending sort:
If {?@SortOrder} = 1 Then
{Report;1.Applicant}

//{@Date} - specify descending order
If {?@SortOrder} <> 1 Then
totext({@Date},"yyyy/MM/dd")

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top