>Is there an obvious way to remove trailing carriage returns at the end of memo field - nasty in reports that display alltrimed memos. I have tried a substr() command replacing chr(13) with "" but this not working. Thank you in advance if someone knows the best way.
How about this.
Put memo field into a variable
lcMemoField = ALLTRIM(Table.MemoField)
Get the length
lnLengthOfMemoField = LEN(lcMemoField)
check to see if last character is carriage return
IF SUBSTR(lcMemoField,lnLengthOfMemoField,1) = CHR(13)
Remove it
REPLACE Table.MemoField WITH SUBSTR(lcMemoField,1,lnLengthOfMemoField-1)
ENDIF
I am sure you can combine the above lines into one, but I separated them for readability of what I was doing.
HTH
Bret Hobbs
"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope