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

String is Non-Numeric

String is Non-Numeric

String is Non-Numeric

I am new to this message board and have only worked with Crystal for a short time.

Question is this:
When I remove a flag from the selection criteria, which is {OEFCHEADER_1_NF.OECH_CM_FLAG} = 1.00 (it's a number field)to only show Invoice credits, it affects another formula field which is:
ToNumber (Mid ( ToText({OEFCHEADER_1_NF.OECH_INVOICE_DATE}, 0, ""), 5, 2))
With this formula, I am extracting the month out.  I am getting an error saying the above string is Non-Numeric.  If I put the selection criteria back in, it works fine.

Not sure if this is enough information...however if anyone has any suggestions, it would be greatly appreciated.

RE: String is Non-Numeric


Delete Tonumber from the formula and test run it and check for the result.

Mid ( ToText({OEFCHEADER_1_NF.OECH_INVOICE_DATE}, 0, ""), 5, 2)

There may be data error, one of the field values could be text. This way you can find the problem record and fix the value in database.

RE: String is Non-Numeric

To get rid of the error, use the following:

if isnumeric(ToNumber (Mid ( ToText({OEFCHEADER_1_NF.OECH_INVOICE_DATE}, 0, ""), 5, 2))) then
ToNumber (Mid ( ToText({OEFCHEADER_1_NF.OECH_INVOICE_DATE}, 0, ""), 5, 2))

If you need this data to be accurate for your report, I'd create a real date field using a SQL Expression in Crystal and then yse a record selection formula to eliminate the offending rows from the result set and just use the MONTH() function against the SQL Expression returned date.


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