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

Formula Error

Status
Not open for further replies.

dbltt25

MIS
Nov 29, 2000
28
US
I have the following formula in a report of mine:

Right (Trim ({Cpftxt.FTXT}), Length (Trim ({Cpftxt.FTXT})) - 39)

The cpftxt.ftxt field is a string field that can hold 60 Characters.
When I do an error check in the Formula Editor, I have no errors. However when I preview the report I get the following error:

String length is less then 0 or not an integer.

Can anyone explain why I am getting this error message when I preview my report.
Any help is appreciated!!
Thanks

 
Hi,
When you "trim" the string it is taking away all null or blank spaces. So the new length could now be 20 instead of 60. When you then subtract 39 (from 20), you get -19. That is where your error is coming from. I hope this helps!
Brett Please visit my websites!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top