×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

sort order

sort order

sort order

(OP)
I am using CR16

I have a parameter which allows user to say if they want to sort by currency or %movement. This parameter is applied to a group level which is hidden

It works fine except the sort order for %movemnt doesnt always show in order I would expect

eg it can show 1.01
2.06
22.98
5.75
6.30

I would expect it to be

1.01
2.06
5.75
6.30
22.98

The group level is defined as follows
and I think the issue is something to do with the formula where it asks me to put the %Movement in text in order for it to work

If {?SortOrder}="Currency" then {View_CurrencyPairs_v2.Ccy2} else totext({@Movement%})

RE: sort order

Apparently the data type of View_CurrencyPairs_v2.Ccy2 is text (Otherwise you would get an error with your If statement). Text does a different sort order than numeric. Not sure of an easy fix to this. Someone else got any ideas?

RE: sort order

Wrap the text in tonumber().

-LB

RE: sort order

(OP)
The trouble is if I do that it falls over when trying to display by currency rather than % movement. I have a parameter called sort order you see

When I put tonumber before FXRATES_1st.ccy it doesn't like it

If {?SortOrder}= "Currency" then tonumber({FXRATES_1st.ccy}) else ({@Movement%})

RE: sort order

Pad the number with leading zeros and use that as the sort order, but just display the number. It might look something like this (assuming that all numbers will have 2 decimal places):

Right('000' + {@Movement%}, 6)

-Dell

Senior Manager, Data & Analytics
Protiviti
www.protiviti.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close