Print Page | Close Window

"Left" Syntax Error

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9007
Printed Date: 18 May 2024 at 10:52am


Topic: "Left" Syntax Error
Posted By: stefshuuj
Subject: "Left" Syntax Error
Date 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"



Replies:
Posted By: DBlank
Date 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


Posted By: kevlray
Date 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"


Posted By: stefshuuj
Date 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"


Posted By: davejwhite
Date 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.



Print Page | Close Window