Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

could someone please tell me whats 1

Status
Not open for further replies.

darwin101

Programmer
Mar 7, 2001
156
US
could someone please tell me whats wrong here. this formula works fine in Report Designer, but after successfully running then, viewing it from Info Analyzer I receive the message "The string in non-numeric".

<labour hours is numeric>

StringVar X := toText(Sum({RO_LABOR_TA71.LABOR_HOURS}, {RO_ITEM_TA53.WIP_LOCATION}));
StringVar H;
stringVar M;
M := Right ( X , 2 ) ;
H := Left ( X ,5 );
(toNumber((Left(toText(H),2))) + (toNumber((Right(toText(M),2)))) * .06 ) / 10

i have changed this formula several times, it always works in designer, but errors out in info Analyzer :-(
Thanks for your time and help!
 
This normally occurs when you name specific character positions (in Left and Right formulas, for example)and your field isn't static. For example, you'll see 12/31/2001 12:12:12 which is 19 characters in length Vs. 1/31/2001 12:12:12 which is 18 characters in length. If your formula is ToNumber(Left(ToText({TableName.FieldName}),2) for the first date then the return is 12. If your formula hits the second date it attempts to convert '1/' to a number and you get the infamous &quot;The string in non-numeric&quot; error message.

Try converting your Date Time values into String within your Report Options Form (File|Report Options). You should then be able to parse your field correctly because the value will be converted into a static format (MM/DD/YYYY 00:00:00, for example).
 
Thanks Rhinok; it was easier for me to do it in the SQL statement, i am better at SQL than CR .. thanks for your help.. it was a good lesson for me :)
to_number(substr(ROL71.labor_hours,1,instr(ROL71.labor_hours,'.')-1) || substr(ROL71.labor_hours,instr(ROL71.labor_hours,'.')+1) * .06 /10 ) as &quot;LabHrs&quot;,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top