Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: "Left" Syntax Error Post Reply Post New Topic
Author Message
stefshuuj
Newbie
Newbie
Avatar

Joined: 24 Feb 2009
Online Status: Offline
Posts: 9
Quote stefshuuj Replybullet Topic: "Left" Syntax Error
    Posted: 01 Feb 2010 at 8:16pm
Hello again all,
 
I have a field that has for example content "110 Ellip" which is being pulled from our database and cannot be changed.
 
I only want to show the "110" in the field on the report.
 
I am trying to use:
 
left({tablename.fieldname},3)
 
However keep getting an error about the selection must be a boolean.
 
An I heading down the right path here?
 
 
Thanks in advance
Stephen
Thanks in Advance
Stephen
"CR Newbie"
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Feb 2010 at 8:35am
Yes but it sounds like youa re putting that in your select expert rather than a formula field.
Use that syntax
left({tablename.fieldname},3)
in a formula field
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 02 Feb 2010 at 8:59am
Where as if they want to filter the report by entries that have the "110" it would be left({tablename.fieldname},3) = "110"
IP IP Logged
stefshuuj
Newbie
Newbie
Avatar

Joined: 24 Feb 2009
Online Status: Offline
Posts: 9
Quote stefshuuj Replybullet Posted: 02 Feb 2010 at 2:06pm
Thanks Guys, Works perfectly now.
 
I was putting it in the select record expert rather then the formula.
 
Cheers
Thanks in Advance
Stephen
"CR Newbie"
IP IP Logged
davejwhite
Newbie
Newbie


Joined: 19 Jan 2010
Online Status: Offline
Posts: 34
Quote davejwhite Replybullet Posted: 03 Feb 2010 at 2:29am
You can also use a Field Subscript - like this
 
({tablename.fieldname} [1 To 3]
 
What is inside the square brackets determines what part of the string it extracts by character position.
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.014 seconds.