|
-
Aug 11th, 2003, 10:27 AM
#1
Thread Starter
Lively Member
Crystal Reports Formula Error
Dear All,
When I type this formula in the formula editor
<pre>
if {AN_PaymentDtl.ServiceType} = "N" then "New" else "Old"
</pre>
I get this error:
“The result of selection formula must be a Boolean”
Thank u for the help
<><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><>
-
Aug 11th, 2003, 10:32 AM
#2
Frenzied Member
The error says it all. In some cases you should use a True/False formula, and this seems to be the case. Where are you using your formula?
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Aug 11th, 2003, 10:41 AM
#3
Thread Starter
Lively Member
Lunatic3, thank you for your reply.
I am using the formula inside the CR report in one of the feilds, I selected the filed then selected the "Select Expert", then selected "Formula".
This field contain one of 2 letters only, "N" for "new" and "O" for "Others", so I want the report to check if it's "O" or "N" then will print the related word in the report.
<><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><>
-
Aug 11th, 2003, 11:18 AM
#4
Thread Starter
Lively Member
*** RESOLVED ***
I shouldn't select "Select Expert" option, I should create a new formula with the condition I want, then replace it in the report.
Thanks for the help.
<><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><>
-
Aug 11th, 2003, 11:19 AM
#5
Frenzied Member
I was just writing that 
Also you may write your formula like this:
IIF ({AN_PaymentDtl.ServiceType} = "N" ,'NEW" ,"Old" )
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Aug 12th, 2003, 06:33 AM
#6
Thread Starter
Lively Member
I'll try it....
Thank you for your help
<><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|