pos1 := Instr(trim({Table.YourString})," "
//there is no garuantee that there is a third word
//though from the example given that doesn't seem to be a
//problem and the "IF" test can be removed
if Instr(trim({Table.YourString}),pos1," " <> 0 then
pos2 := Instr(trim({Table.YourString}),pos1," "
Jim -
You are right. I didn't think this through before posting. What I had in mind was to clip off the first word with
StringVar s := Mid(Trim({YourString}),Instr(Trim({YourString})," ");
and then to return the second word with
Left(s,Instr(s, " ")
Another way this can be achieved is by downloading the UFL from the Crystal decision website called UFLTECH1.EXE. Once this is installed you will have a function called 'GetWord' and its syntax is -
GetWord ({Table.Field}, 2)
Where the 2 signifies the word count.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.