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!

Trim a string with Crystal 3

Status
Not open for further replies.

lous

Technical User
Mar 8, 2002
53
US
If I use the following formula in Crystal 7, it works. But Crystal 3 gives me an error and I'm not sure how to fix it.

Right({Relord.relord_stockno},4)

This would take the string and just return the last 4 numbers. Doesn't work with version 3 and I am unfamiliar with this version. I need to use Crystal 3 for this particular application because the program that runs the report only uses Crystal 3.

Help please?

Thanks.
 
I would be very suprised if your program will not allow a newer version of Crystal to run. Upgrade your version of crystal.

Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
This must be done in Crystal 3, so is it possible to do what I asked or not?
 
Perhaps:

({Relord.relord_stockno} [10 to 25])

Where 10 = a standard starting length. If it varies, perhaps it supports the instr() function, or the len() function.

({Relord.relord_stockno} [len({Relord.relord_stockno})-4 to 100])

Crystal 3 is VERY old, so you're not likely to find a expert who remembers what functions worked in it.

I suggest that you check the help file and see if any of the following functions are available:

MID() (like SUBSTRING)
INSTR() (Finds a string within a string)
LEN() (Length of a field)

An alternative might be to create a View or a different table with the properly formatted field and have the CR 3 report use that.

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

Part and Inventory Search

Sponsor

Back
Top