Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: CR Processing Engine Post Reply Post New Topic
Author Message
freebird40CR
Newbie
Newbie


Joined: 28 Nov 2012
Online Status: Offline
Posts: 9
Quote freebird40CR Replybullet Topic: CR Processing Engine
    Posted: 05 Dec 2012 at 6:01am
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.
 
_______________________________________________________
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.