>Is there a way to carry a group total (calculated in the group footer) forward into the footer for the next group so that it can be used in a calculation to provide the % change between the 2 groups?
>
>Suppose the report is grouped on year, with columns for each month. In the footer for 2008 we want the calculate the % change for jan08 over jan07.
>
>IE result = (jan08grouptotal - jan07grouptotal) / jan07grouptotal
>
>Thanks
Let's say you need 12 totals .... one for each month ...
Create 24 report variables; rnJanPrev, rnFebPrev, ... rnDecPrev, rnJanCurr, rnFebCurr, ... rnDecCurr. For the "Prev" variables, set the initial value to 0, set the expression to 0, set the calculate option to SUM and have them reset at end of report. For the "Curr" variables, set the initial value to 0, the expression to whatever field you need, and reset at the data group.
In the OnExit expression of the data group footer enter this:
_VFP.SetVar('rnJanPrev', rnJanCurr) AND _VFP.SetVar('rnFebPrev', rnFebCurr) AND ... _VFP.SetVar('rnDecPrev', rnDecCurr)
In the data group footer, print (rnJanCurr - rnJanPrev) / rnJanPrev ... and so on.