BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: No events within the next 45 days.

How to remove Characters from middle of string


 
Search this topic... | Search Crystal Reports... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Author Message
majijonah
Forum Member
Forum Member



Joined: 30 Aug 2018

Posts: 5



PostPosted: Tue Nov 06, 2018 5:01 am 
Post subject: 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
Back to top
kevlray
Forum Associate
Forum Associate



Joined: 23 Jun 2010

Posts: 902
Location: California


flag
PostPosted: Tue Nov 06, 2018 5:05 pm 
Post subject: Re: How to remove Characters from middle of string

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)
Back to top
majijonah
Forum Member
Forum Member



Joined: 30 Aug 2018

Posts: 5



PostPosted: Wed Nov 07, 2018 8:06 am 
Post subject: Re: How to remove Characters from middle of string

Thanks kevlray, It works perfectly
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0321 seconds using 17 queries. (SQL 0.0028 Parse 0.0009 Other 0.0283)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo