Current Gift Year formula:
year({CnGf_1.CnGf_1_Date})
_______________________________________________________
Previous Gift Year formula:
Local NumberVar PreviousGiftYear := Year(Previous({CnGf_1.CnGf_1_Date}));
Local NumberVar GiftYear := Year({CnGf_1.CnGf_1_Date});
If Previous({CnBio.CnBio_SortKey}) = {CnBio.CnBio_SortKey} then
PreviousGiftYear
else
GiftYear
_______________________________________________________
Recapture Year Difference:
Local NumberVar PreviousGiftYear := Year(Previous({CnGf_1.CnGf_1_Date}));
Local NumberVar GiftYear := Year({CnGf_1.CnGf_1_Date});
Local NumberVar YearDiff;
WhilePrintingRecords;
YearDiff := GiftYear - PreviousGiftYear;
The YearDiff is not correct IF there is ONLY one gift year. The data is sorted by donation date and is grouped on donor.
_______________________________________________________