Print Page | Close Window

conditional more then 1

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4514
Printed Date: 05 May 2025 at 3:43am


Topic: conditional more then 1
Posted By: ismailkoca
Subject: conditional more then 1
Date Posted: 11 Oct 2008 at 4:09pm

i can 1 conditional by using formula like ; if({deneme.deneme2} in 11 to 88) then "you're good"

but i can't do contional more then 1 like;
if({deneme.deneme2} in 11 to 88) then "you're good"
({deneme.deneme2} in 89 to 118) then "you're so good"
 
i want to do 1 formulafield but 2 pr 3 conditional
Sorry for my poor English.
 
Thank U


-------------
www.cokluzeka.net



Replies:
Posted By: BrianBischof
Date Posted: 13 Oct 2008 at 11:54am
You can do this by adding the "Else If"keyword to your logic. Here is sample code:
IF ({deneme.deneme2} in 11 to 88) then
    "you're good"
ELSE IF ({deneme.deneme2} in 89 to 118)  then
    "you're so good"
ELSE IF ({deneme.deneme2} in 119 to 200) then
    "you're the ultimate in good";
I have the complete Crystal syntax documented with sample code in my Encyclopedia book. You can find out more about my books at http://www.amazon.com/exec/obidos/ASIN/0974953601/bischofsystem-20 - Amazon.com or reading the http://members.crystalreportsbook.com - Crystal Reports eBooks online.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: ismailkoca
Date Posted: 13 Oct 2008 at 3:07pm
Thank U 4 ur reply,
but i have a new problem,
i can do
IF ({deneme.deneme} in 11 to 88) then

    "you're good"

and ({deneme.deneme2} in 11 to 88)  then
" you're so good"
 
how can i do it.
 
Thank U very much.


-------------
www.cokluzeka.net


Posted By: BrianBischof
Date Posted: 13 Oct 2008 at 7:02pm
I don't understand your question. You test for "11 to 88" two times with differerent results. Did you put the wrong numbers in the second part? Shouldn't it be 89 to 118? And why did you put the "AND" in there? Confused...

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: Savan
Date Posted: 14 Oct 2008 at 2:29am
u can do it this way
 
IF ({deneme.deneme} in 11 to 88) and ({deneme.deneme2} in 11 to 88) then
    " you're so good"
else
    "you're good"


-------------
Thanks
Savan



Print Page | Close Window