Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Extract part of a string based on a variable set.. Post Reply Post New Topic
<< Prev Page  of 2
Author Message
Frank in VA
Groupie
Groupie
Avatar

Joined: 15 Nov 2007
Location: United States
Online Status: Offline
Posts: 46
Quote Frank in VA Replybullet Posted: 23 Feb 2017 at 4:23am
Hi Kevlray,

I have a need to do something which I believe is similar to what you've created here.  I have a variable sized field which ends with an account number.  I need to report on all records where the account number begins with an '8', which will always be in the 10th position from the right.  Is there a way, starting from the end of the field, to check the 10th position to see if it is an '8'?  I've been playing around with the right() function but not getting the results I need.  

Thanks!
Frank
Frank
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 27 Feb 2017 at 5:28am
Right is the way to go, but you have to use the length of the string -10 (i.e., right({somestring},len(somestring)-10) )
IP IP Logged
Frank in VA
Groupie
Groupie
Avatar

Joined: 15 Nov 2007
Location: United States
Online Status: Offline
Posts: 46
Quote Frank in VA Replybullet Posted: 28 Feb 2017 at 8:54am
Awesome!  Thanks!
 
Frank
Frank
IP IP Logged
<< Prev Page  of 2
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.047 seconds.