Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Left(Table.fieldname) Post Reply Post New Topic
Author Message
namitanamburi
Newbie
Newbie


Joined: 26 Mar 2009
Online Status: Offline
Posts: 39
Quote namitanamburi Replybullet Topic: Left(Table.fieldname)
     Posted: 07 Jul 2009 at 1:29pm


Hello,

What does this formula mean?

if left({table.field}, 13) = "john amy-federation" then "p" else "a";


my understanding is that

If Starting from left of the field, the 13th character from left is "john amy-federation" then "P" else "a"

Can anybody correct me if iam wrong??



Thanks
Namita


Edited by namitanamburi - 07 Jul 2009 at 1:29pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jul 2009 at 3:11pm
It is stating if the first 13 characters starting from the left are sequentially 'john amy-federation' then the formula field will show a 'p' otherwise it will show an 'a'. Given that john amy-federation is 19 characters long then it will always be 'a'.
If you wanted to start on the 13th character you can use the mid function
Mid (str, start, length)
or you could just use the instr function
InStr (str1, str2)
 
IP IP Logged
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