Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: 2 requirements for if then statement Post Reply Post New Topic
Author Message
kreusch
Newbie
Newbie


Joined: 04 Nov 2011
Online Status: Offline
Posts: 22
Quote kreusch Replybullet Topic: 2 requirements for if then statement
    Posted: 19 Oct 2012 at 9:37am
I have an if then statement that I need to pull the info if 2 things are true. 
 

If (month( {@End Date})=
month ({GLTransactionMasterList.GLTransactionDate}) and
({GLAccounts.GLAccountTypeID} = '1001'))
 then {GLTransactionMasterList.GLTransactionDebitAmount}
My formula isnt working, any suggestions?
IP IP Logged
shanth
Groupie
Groupie


Joined: 06 Aug 2012
Location: United States
Online Status: Offline
Posts: 75
Quote shanth Replybullet Posted: 19 Oct 2012 at 10:37am
I assume your formula doesnt work means, you are not getting any results,
Try to put ELSE part for your table something like:
If (month({@End Date})=month({GLTransactionMasterList.GLTransactionDate}) and {GLAccounts.GLAccountTypeID} = '1001')
 then {GLTransactionMasterList.GLTransactionDebitAmount} ELSE 0
If the result is 0 then research individually, first month({@End Date}), month({GLTransactionMasterList.GLTransactionDate}), just to make sure if they are in same format and getting expected month numbers
IP IP Logged
kreusch
Newbie
Newbie


Joined: 04 Nov 2011
Online Status: Offline
Posts: 22
Quote kreusch Replybullet Posted: 19 Oct 2012 at 3:49pm

Got it, thanks.  My error was in my thinking in the report design not my formula. 

IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.