Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Syntax Code Help, if, and ,else Post Reply Post New Topic
Author Message
Leite33
Newbie
Newbie


Joined: 26 Aug 2010
Online Status: Offline
Posts: 2
Quote Leite33 Replybullet Topic: Syntax Code Help, if, and ,else
     Posted: 07 Aug 2012 at 7:07am
Hi
I want some help with a syntax in Crystal Report

I have these fields on a Database:      NumberPar,Cash,Sales, Ammount

I want to bring and sum the ammount from  records that are in :
NumberPar=1,3,4
Cash='Cash'
Sales=1

I need some if and and statement but i dont know how to syntax it so to get the records i am interested and sum them

Any ideas?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 08 Aug 2012 at 3:49am
You'll do something like this:
 
If (NumberPar in [1, 3, 4]) and (Cash = 'Cash') and (Sales = 1) then Ammount else 0
 
You'll need to translate this to the appropriate Crystal syntax, but this is the logic you'll use.
 
-Dell
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