I have a database that stores check detail for each person. Each person can have a differing number of checks. Each check is assigned a status (paid, eligible, or ineligible) and a date. Looks like this:
7/01/2003 paid (1974)
7/08/2003 ineligible (2036)
7/14/2003 ineligible
Each person is assigned a status (active, inactive). When the status is inactive, a date is entered. I created a Crystal report, which has a date range parameter, to list those checks which have been paid within that date range. My dilemma is this: when a person’s status is inactive, I need to see all the remaining payments (whose status is now ineligible) regardless of the date of the payment. And if a person is inactive, that person will only be reported once and not in subsequent reports, based upon the inactive date. I have tried to use the following report selection formula, but to no avail:
[{sp_calc_return_comp_sui.paymentStatusID} = 1974 and {sp_calc_return_comp_sui.payment_date}in {?DateRange}
or {sp_calc_return_comp_sui.paymentStatusID}=2036 and {sp_calc_return_comp_sui.returnToWorkDate} in {?DateRange}
or {sp_calc_return_comp_sui.payment_date} in {?DateRange}]
Any help would be greatly appreciated!
7/01/2003 paid (1974)
7/08/2003 ineligible (2036)
7/14/2003 ineligible
Each person is assigned a status (active, inactive). When the status is inactive, a date is entered. I created a Crystal report, which has a date range parameter, to list those checks which have been paid within that date range. My dilemma is this: when a person’s status is inactive, I need to see all the remaining payments (whose status is now ineligible) regardless of the date of the payment. And if a person is inactive, that person will only be reported once and not in subsequent reports, based upon the inactive date. I have tried to use the following report selection formula, but to no avail:
[{sp_calc_return_comp_sui.paymentStatusID} = 1974 and {sp_calc_return_comp_sui.payment_date}in {?DateRange}
or {sp_calc_return_comp_sui.paymentStatusID}=2036 and {sp_calc_return_comp_sui.returnToWorkDate} in {?DateRange}
or {sp_calc_return_comp_sui.payment_date} in {?DateRange}]
Any help would be greatly appreciated!