Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: If Then Else parameter formula question Post Reply Post New Topic
Author Message
Leah
Newbie
Newbie


Joined: 14 Aug 2008
Location: United States
Online Status: Offline
Posts: 1
Quote Leah Replybullet Topic: If Then Else parameter formula question
     Posted: 14 Aug 2008 at 7:21am
Hello,
 
I'm trying to create is a parameter field ({?Blank entry}) where the user can type in a keyword and the account name will be returned if that keyword is in one or more database fields ({C_CALLER.CALLERNAME} , {C_CALLER.FACILITYNAME}, {C_REFERRAL_SOURCE.REFNAME}, {C_REFERRAL_SOURCE.FACILITYNAME}).
 
I've tried to do this using a nested "If Then Else" statement and the "In" array, but I'm getting a message that "The result of selection formula must be a boolean."
 
I haven't been able to find any examples of a similar formula, and I don't know where my error is. Any ideas?
 
Record Selection Formula:
if {?Blank entry} in {C_CALLER.CALLERNAME} then {ACCOUNT.ACCOUNT} else
if {?Blank entry} in {C_CALLER.FACILITYNAME} then {ACCOUNT.ACCOUNT} else
if {?Blank entry} in {C_REFERRAL_SOURCE.REFNAME} then {ACCOUNT.ACCOUNT} else
if {?Blank entry} in {C_REFERRAL_SOURCE.FACILITYNAME} then {ACCOUNT.ACCOUNT} else ""

 
Thanks!
 
Leah


Edited by Leah - 14 Aug 2008 at 7:21am
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 15 Aug 2008 at 1:44am
 
Place the account field in your report then in record selection formula enter the code below in the below scenario both the filelds should have the matching parameter values
 
if
{C_CALLER.CALLERNAME}LIKE {?My Parameter} AND
{C_CALLER.FACILITYNAME} LIKE {?My Parameter}  then
true
else
false
cheers
Rahul
IP IP Logged
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