Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Remove last character Post Reply Post New Topic
Author Message
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Topic: Remove last character
    Posted: 24 Jan 2014 at 9:56am
Hi, I need to know how to remove the last character in an employee's name IF the last character in the name is '.
So an employee appears like this now:
Jones, Bobe'
It should appear like this
Jones, Bobe
Thanks!
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 24 Jan 2014 at 12:36pm
if right({table.field},1_ = "'" then
left({table.field}, len({table.field}) -1)
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 24 Jan 2014 at 2:46pm

Looks like I'm getting an error with this formula. I changed the formula to read:

 
I must have something wrong...


Edited by thummel1 - 24 Jan 2014 at 3:32pm
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 24 Jan 2014 at 5:03pm
I got this to work by doing something else, and I added an additional part ot he formula because I had to remove the trailing space at the end of a couple records:
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
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.