Try this change:
Local NumberVar PreviousGiftYear := Year(Previous({CnGf_1.CnGf_1_Date}));
Local NumberVar GiftYear := Year({CnGf_1.CnGf_1_Date});
Local NumberVar YearDiff;
WhilePrintingRecords;
//If the donor has more than one donation date
If not PreviousIsNull({CnBio.CnBio_SortKey}) or Previous({CnBio.CnBio_SortKey}) = {CnBio.CnBio_SortKey} then
PreviousGiftYear
else //default to current year if there is no previous record
GiftYear;
YearDiff := GiftYear - PreviousGiftYear;
-Dell