Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Newbie IF Function Post Reply Post New Topic
Author Message
tigerorange
Newbie
Newbie
Avatar

Joined: 12 Aug 2011
Location: United States
Online Status: Offline
Posts: 1
Quote tigerorange Replybullet Topic: Newbie IF Function
     Posted: 12 Aug 2011 at 4:52am
I'm using Crystal Reports XI.  I have a data set on unique job#'s each job # runs through multiple operations I want to pull Sales value for 2 operations. 
                  IF (cc_table) = "Name" or (cc_table)="Name"
                  Then (sales_table)
                  Else 0.00.
 
This function works fine but if the job doesn't go through these last two operations then I want it to pull the sales value for the last operation completed.
 
Any help would be appreciated.
IP IP Logged
sph123
Newbie
Newbie


Joined: 14 Aug 2011
Online Status: Offline
Posts: 3
Quote sph123 Replybullet Posted: 15 Aug 2011 at 1:48am
Hi you can have multiple IF statements
try this

       IF ISNULL(cc_table) THEN (VALUE FROM OTHER TABLE)
       ELSE IF (cc_table) = "Name" or (cc_table)="Name" THEN (sales_table)
       ELSE 0.00.


YOUR CODE BELOW
  

               IF (cc_table) = "Name" or (cc_table)="Name"
                  Then (sales_table)
                  Else 0.00.

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