Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Replacing Values Post Reply Post New Topic
Author Message
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Topic: Replacing Values
    Posted: 13 Mar 2014 at 9:19am
I amusing CR v11 and have a field within a table that I need to replace the last 3 (or 4 when there is a 4th) digits with something different.
 
Example:
 
The field within the table has a number such as 12345678901C  or 12345678901CR.
 
I need to create a formula that will replace the  01C and/or the 01CR with *01
 
I think it's simple, but can't figure this one out.
 
Thanks in advance
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 13 Mar 2014 at 9:58am
I am assuming that the length of the data is fixed (12 or 13 characters long).  If not you will need a slightly different a approach.

left({field},9)+"*"+mid({field},10,2)
IP IP Logged
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Posted: 13 Mar 2014 at 10:46am
It was not a fixed length, so I tweaked it just a bit and it works perfectlly....Thank you so much!Smile
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.