cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Remove last carriage return from address string

lsauser
Participant
0 Likes
1,713

Hi all,

I have an address block like such;

123 Fake St
Suburb, VIC
4512

I want to only remove the last carriage return so it looks like;

123 Fake St
Suburb VIC 4512

I know i can use the following to get rid of all the carriage returns which does put it all on one line and i have played around with this with no luck getting it right. I have a feeling i need to use a combination of instr, strreverse and right but havent been able to get the logic to work.

replace({Header.Address},chrw(13),'')

As always, any help is greatly appreciated.

View Entire Topic
msundararaja_perumal
Active Contributor
0 Likes

Hello,

I believe you are using the crystal report for SAP Business One, I suggest you directly pick the address from the BP Master address lines in order to avoid this issue.

Thanks.