Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula field help needed

Status
Not open for further replies.

rubberhead10

Technical User
Sep 13, 2006
49
US
hello all
please forgive me this is probably an easy question to answer but my formula skills suck... I am using crystal reports 10 I have written the following code but it does not seam to give me what I want

if {PR_Empl_Deductions.Deduction Code} = "401k", "401k% then {PR_Empl_Deductions.YTD Amount} else 0

what I am looking for is if the deduction code is = to 401k or 401k% then show me the year to date ammount. if they do not have a YTD ammount then show 0

any help is greatly appreciated.......THANKS
 
if {PR_Empl_Deductions.Deduction Code} in ['401k','401k%'] then {PR_Empl_Deductions.YTD Amount} else 0

'J
 
If you mean the % sign to represent a wildcard, then within CR you would use:

if {PR_Empl_Deductions.Deduction Code} like '401k*' then {PR_Empl_Deductions.YTD Amount} else 0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top