Hello Crystal amateur needing help creating an IF statement with four variables using conditions. If employee is active and has a seniority higher than 365 days then “Eligible” if less “Not Eligible” and if active and {numeric field} >= 1 then “active” else “Terminated”
It looks like you’re actually looking for two different results - one that indicates whether the person is active or terminated and another for Eligible or Not Eligible. Here’s how I might write these (assuming that seniority is based on date of hire):
{@isActive}
if {active employee} and {numeric field} >= 1 then
'Active'
else
'Terminated'
{@Eligible}
if {@isActive} = 'Active' and CurrentDate - {Hire Date} > 356 then
'Eligible'
else
'Not Eligible'
“CurrentDate” is Crystal’s way of getting the date that the report is being run.