Skip to Content

Converting a charvar2 to number, decending order shows 100 after smallest number

Using Crystal Reports

I have student grades that are stored as varchar2, I convert them to numbers using

If NumericText ({HONORROLL.GPA}) then Val ({HONORROLL.GPA}) else 0 (I have also tried ToNumber)

But.. then Record Sort ascending or descending does not put the students who have 100% in the right spot.

See attached jpg

Thank you in advance for any help you can give me.

sortorder.jpg (44.7 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Apr 07, 2016 at 06:13 PM

    Hi Pegeen,

    Does the report have a Group on any field?


    Add a comment
    10|10000 characters needed characters exceeded

    • OK. Could you go to the Record Sort Expert and add the @GPA formula to the sort list?

      You should already see the 'Grade' group in there however, @GPA formula needs to be the very next field in that list.

      If that doesn't work as well, would you be able to send the .rpt file 'with saved data' to my e-mail?


  • Posted on Apr 08, 2016 at 11:37 AM

    That worked. Thank you so much.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.