Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Boolean required here Post Reply Post New Topic
Author Message
deano
Newbie
Newbie
Avatar

Joined: 22 Feb 2007
Location: United States
Online Status: Offline
Posts: 5
Quote deano Replybullet Topic: Boolean required here
    Posted: 08 Jun 2010 at 6:16am
I typed  formula  --- If {product category} = "SI" then {Qty Shipped} / 1000 else {Qty Shipped}
 
I get an error message between "else" and "{Qty Shipped} that a Boolean is required here.
 
I am using cross-tabs to show quanty shipped in each product category by each territory across the US.  Some numbers become rather large so would like to divide them them by 1000.  But others are small so want to see whole number not divided by 1000.
 
What is wrong with my formula????
 
Deano
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2010 at 6:36am
Did you place this formula in the record selection?
It should be in a New Fomrual in the Field Explorer.
IP IP Logged
deano
Newbie
Newbie
Avatar

Joined: 22 Feb 2007
Location: United States
Online Status: Offline
Posts: 5
Quote deano Replybullet Posted: 08 Jun 2010 at 7:52am
Where I am having trouble is in Select Expert....Formula Editor.  I had made the formula in Field Explorer and had no problem ... the formula was accepted with no errors....however I don't know where to put it.  I tried placing it on one of the cross-tab squared but it didn't replace what was already there. ?????
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2010 at 8:23am
Where you inserted QTY SHipped into your Crosstab Design, replaec it with your formula
Qty_Shipped_Altered
If {product category} = "SI" then {Qty Shipped} / 1000 else {Qty Shipped}
 
IP IP Logged
deano
Newbie
Newbie
Avatar

Joined: 22 Feb 2007
Location: United States
Online Status: Offline
Posts: 5
Quote deano Replybullet Posted: 08 Jun 2010 at 8:49am
I couldn't figure out how to just replace the formula so I remade the cross-tab page again and inserted the fromula and it worked.  Thanks!!!
 
Can you tell me what that mean when I get that error message "Boolean required here"?  And what am I suppose to do to correct my formula?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2010 at 9:01am

Whenever you get that message it is expecting your formula to return TRUE or FALSE (a boolean).

Unfortunately how to correct it is not cut and dry.
 
The select expert always want to use a boolean result from a formula to decide to include (TRUE) or exclude (FALSE) a row of data. So if you put a formula that returns something other than a boolean (like yours returns a number) it can't use that information to figure out if the row is 'good' or 'bad' and spits the error.
There are other places that you will get a boolean error as well but too many to explain nor do I know them all Shocked
Does that help?
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.031 seconds.