Print Page | Close Window

Stripping Charachters

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22660
Printed Date: 02 May 2024 at 6:55pm


Topic: Stripping Charachters
Posted By: BoltzGirl
Subject: Stripping Charachters
Date Posted: 20 Aug 2018 at 11:25am
I have a field that I want to do a formula on to strip the field to only giving me back 3 characters that are within the field.

It is not in the same place at all times.

Example:
00CH006&&&
20%CH004

I want to always return only the 3 values 'after' the H in this field so that my result looks like 006 on the first record and 004 on the second record.

I know I have seen this done before and cannot find it anywhere so your help is much appreciated.


-------------
Always appreciate the help!



Replies:
Posted By: Valert16
Date Posted: 20 Aug 2018 at 10:27pm
Try this formula:

Mid({FieldName}, InStr({FieldName}, "H")+1, 3)

Replace "FieldName" by its real name.


Posted By: BoltzGirl
Date Posted: 21 Aug 2018 at 4:15am
Worked perfectly!!! Thank you so very much!   

-------------
Always appreciate the help!



Print Page | Close Window