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

Using a parameter field to choose sort but with different data types

Status
Not open for further replies.

demchak

IS-IT--Management
Jun 29, 2001
36
US
I am trying to set up a parameter field so the user can select what field to sort on.
I have used text and numbers in the same formula before but this time the data fields are a combo of
date(##/##/##)
Currency($#######.##)
Percentage(##.##%)
and text

All the sorts work in this formula except the dates.
The dates put sort in order
1/07/04
5/02/03

Any ideas on how to conditionaly sort between all the field types would be great

Thanks



If {?SortOrder} = "Fee Amount"
Then totext({OPPORTUNITY_PRODUCT.EXTENDEDPRICE},"#######")
Else
If {?SortOrder} = "Probability"
then totext({OPPORTUNITY.CLOSEPROBABILITY},"####")
else
If {?SortOrder} = "Loan Amount"
Then totext({OPPORTUNITY_PRODUCT.PRICE}, "#######")
else
If {?SortOrder} = "Closed Date"
Then totext({OPPORTUNITY.ACTUALCLOSE})
else
If {?SortOrder} = "Estimated Close Date"
Then totext({OPPORTUNITY.ESTIMATEDCLOSE})
else
{ACCOUNT.ACCOUNT}

 
This might work, or something along these lines (don't have Crystal installed here yet):

totext({OPPORTUNITY.ACTUALCLOSE},"yyyymmdd")

or

picture(totext({OPPORTUNITY.ACTUALCLOSE}),"yyyymmdd")

Something like that...

-k
 
Thanks for the reply..was just testing the same thing when i got the mail.
Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top