BusinessObjects Board

How to remove Characters from middle of string

Hello All,

How to remove first 5 characters and 5 characters from the middle of strings in crystal report. I have records like

YAINV1810WGTRL000004
YAINV1810WGTRL000005
YAINV1810WGTRL000006
YAINV1810WGTRL000007

I want to remove the string “YAINV” and “WGTRL” so that I get
1810000004
1810000005
1810000006
1810000007

Please Help

Regards


majijonah (BOB member since 2018-08-30)

If the strings are always the same length, then you can do this. Otherwise you will have to have a loop to check each character.

mid({somefield},6,4)+right({somefield},6)


kevlray :us: (BOB member since 2010-06-23)

Thanks kevlray, It works perfectly


majijonah (BOB member since 2018-08-30)