Skip to Content
avatar image
Former Member

Sorting numbers in Crystal Reports 10

I have a field that was originally in a string format, but I converted it to a number.

I have values ranging from 7000 to 10000.

I want to sort in either ascending or descending order it doesn't matter.

The results I get are not what I want. It either sorts it one of the following orders.

10000

7000

8000

9000

or

9000

8000

7000

10000

I want it to do the following:

7000

8000

9000

10000

or

10000

9000

8000

7000

Any ideas how to make it sort it correctly?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 08, 2008 at 03:05 PM

    have you used them in a group? or as a group? because when you use them as a group it gives you the facility to use it as ascending or descending.

    Alternatively, check what other fields which might be related to this might be causing the inappropriate sorting of this field.

    Try placing the only "number" field on an empty report and then use ascending order and see if that works. If it does then something else is causing the issue. If however it does not then it must be something I don't know about.

    Have you tried Record Sort from "Report--->Record Sort" and put the field in it and see if that sorts the record?

    Regards

    Jehanzeb

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Graham Cunningham

      Graham,

      Thanks for your help, I had created a formula that changed it to a number and then was using the formula in my report.

      However, when i sorted the report I did it on the string attribute instead of on the number formula.