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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Then Else Statement for 401k match

Status
Not open for further replies.

wanzek1

Technical User
Jun 13, 2012
79
US
I am trying to do the following:

Our company contributes $1 for every $1 you contribute up to the first 2.5% of your pre-tax pay to a max of $2,500.

Here is my formula:

(If ({@Term Date} ="")

and (Sum ({@GrossAmount}, {PREA.Employee})*.025) < 2500
and ({@EC1EC2EC3} >0)
then (Sum ({@GrossAmount}, {PREA.Employee})*.025)

else if ({@Term Date} ="")
and ((Sum ({@GrossAmount}, {PREA.Employee})*.025) > {@EC1EC2EC3} )and ({@EC1EC2EC3} >0)
then ({@EC1EC2EC3})
else 0)

It is not returning everything correctly. For example if the employee does not match 2.5% then the company does not.

(Sum ({@GrossAmount}, {PREA.Employee}) - Employees Gross Wages
{@EC1EC2EC3} - Employees contribution

Any help would be appreciated!
 
Break up the process into separate formula fields and totals, display these in temporary display lines. The answer should emerge.

You also don't need to code totals yourself, in most cases. Let Crystal do the work. The use of Crystal's automated totals is outlined at FAQ767-6524.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top