Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Left function Post Reply Post New Topic
Author Message
clumbsy
Newbie
Newbie
Avatar

Joined: 24 Sep 2009
Location: United States
Online Status: Offline
Posts: 16
Quote clumbsy Replybullet Topic: Left function
    Posted: 04 Aug 2010 at 3:51am
I have a seven digit phone number in which I only want to pull the first three digits (prefix) I used this formula
 
Left({BI_CONSUMER_VIEW_1.BI_HOME_PHN}, 3)
 it gives me an error " A boolean is required here"
 
any suggestions?
 
Carmon
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Aug 2010 at 3:55am

did you put this formula in the select expert? The seelct expert is only used to choose what data goes into the report.

You should create a formula field in the Field Explorer and use that same formula there.


Edited by DBlank - 04 Aug 2010 at 4:00am
IP IP Logged
clumbsy
Newbie
Newbie
Avatar

Joined: 24 Sep 2009
Location: United States
Online Status: Offline
Posts: 16
Quote clumbsy Replybullet Posted: 04 Aug 2010 at 4:01am
Yes, I tried it in the select expert and within the selection formula section. Same results.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Aug 2010 at 4:05am
The select expert is only used to select rows of data based on a T/F evaluation of each row of data  (hence the error expecting a boolean ...T/F).
In the Field Explorere there is the Formula FIelds section.
Right Click  on it and select New.
Name it whatever (e.g. area code)
use the same formula you had in there as the formula is fine assuming the phone number is a string.
IP IP Logged
clumbsy
Newbie
Newbie
Avatar

Joined: 24 Sep 2009
Location: United States
Online Status: Offline
Posts: 16
Quote clumbsy Replybullet Posted: 04 Aug 2010 at 4:08am
Thank you,
It worked!
 
Clap
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.