cancel
Showing results for 
Search instead for 
Did you mean: 

How to sort numerically

Former Member
0 Kudos

In a report I have a column for "time until due". Overdue is shown with minus sign.

I want to sort this column, but the result is that it is sorted as text, e.g.

-73

-7

-5

-49

-47

-142

Can I, by using e.g. som conversion formula, make it sort numerically? I want the list above to be displayed as

-142

-73

-49

-47

-7

-5

I tried to use cdbl(sorting_field) but it didn't work.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Go to Report->Record Sort Expert.

Select the field and order of your choice.

I Hope this will help you.

Regards,

Misra P.

Former Member
0 Kudos

Thank you for your response. However, the Sort Expert only offers Ascending or Descending options. I guess my problem is that my column is an IFieldObject type of field and is sorted as text. I need to convert it to be a Number field. I will follow up in a different forum how to do this.

Former Member
0 Kudos

Hi,

Try Change the field type in report.. Then you will get proper result.

For that create new formula,

tonumber(IFieldObject)

Use this formula field in Report instead of your table field(both desighner and Sort Expert)

Regards,

Salah.

Former Member
0 Kudos

Hi,

Thank you both of you. You put me on the right track, but I need to do it in software because I use a generic .rpt file for a lot of reports, and modify it in a software application in run-time, in order to adjust it to a specific report. I follow up this in a different forum.

Best regards,

- Kjell Arne

Answers (0)