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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Engine Error (Seconds is a non_numeric Field)

Status
Not open for further replies.

ctb1234

Programmer
Oct 18, 2002
1
US
I inherited a problem from a past employee, I get a print engine error when trying to print a previous existing report the error is follows ….Error in Formula <seconds>
'If {usrtable.desc_x} [22} >= &quot;&quot;
the formula is as follows;

'If {usrtable.desc_x} [22} >= &quot;&quot;
then ToNumber ({usrtable.desc_x} [23 to 29] ) can't figure out his formula
 
This is probably because the data doesn't comply with the function.

It may also be because the syntax is incorrect:

If {usrtable.desc_x} [22} >= &quot;&quot;

should be:

If {usrtable.desc_x} [22] >= &quot;&quot;

The character after the 22 was a } and not a ], I'll assume that you caused this error when transposing it to the post.

The formula checks for the equivalent of a NOT NULL using:

{usrtable.desc_x} [22] >= &quot;&quot;

And if it finds that the field is NOT null, it will convert characters 23 to 29 of the string to a number.

I would rewrite it as follows:

If not(isnull({usrtable.desc_x}))
and
isnumeric({usrtable.desc_x}[23 to 29]) then
ToNumber ({usrtable.desc_x} [23 to 29])
else
0

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top