Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: IF Then Else Post Reply Post New Topic
Author Message
Ethiopia@SMS
Newbie
Newbie


Joined: 02 Dec 2010
Online Status: Offline
Posts: 4
Quote Ethiopia@SMS Replybullet Topic: IF Then Else
     Posted: 09 Mar 2011 at 3:48am
Is there any idea?
 
I want to make a formula by using If statement but got error I tried to separet the value by AND/Or but no luck. So what is the correct syntax for such kind of problem.
 
eg.
 
If {comand.table} = 1,2,3,4... Then
sum{comand.Amount}
Else
sum{command.SettledAmount}
 
 
Patiency is a key for development
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Mar 2011 at 4:03am
you cannot conditionally sum like this.
I think you want to use one field or another to get a final total. YOu can use a formula field to flip the value then sum that formual field
Formula name = 'ConditionalValue'
If {comand.table} in [1,2,3,4,etc.] Then {comand.Amount}
Else {command.SettledAmount}
 
now sum that
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