cancel
Showing results for 
Search instead for 
Did you mean: 

running total

Former Member
0 Kudos

Hi All,

I need to show sum of group running total in report footer.

I need to calculate when disporder is 1 or 2 only.

I created formula like this.

numbervar cftot;

numbervar gcftot;

if {Payments.disp_ordr}=1 or {Payments.disp_ordr}=2 then

cftot:=cftot+sum({Payments.totsales},{Payments.pm_desc});

if {Payments.disp_ordr}=1 or {Payments.disp_ordr}=2 then

gcftot:=gcftot+cftot;

if {Payments.disp_ordr}=1 or {Payments.disp_ordr}=2 then

cftot;

Here the sum of all groups which is for disp order 1 or 2 is 12938.This I need to show in report footer.

But in report footer I am not getting 12938.

Please help

PFA

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Divya,

Change the formula to:

whileprintingrecords;

numbervar cftot;

numbervar gcftot;

if {Payments.disp_ordr}=1 or {Payments.disp_ordr}=2 then

(

     cftot:=cftot+sum({Payments.totsales},{Payments.pm_desc});

     gcftot:=gcftot+cftot;

     cftot;

);    

Create a reset formula and place this on the Group Header:

whileprintingrecords;

numbervar cftot := 0;


Create another formula and place this on the Report Footer:


whileprintingrecords;

numbervar gcftot;


-Abhilash



Former Member
0 Kudos

Hi Abhilash,

As per your formula I am not getting running total

abhilash_kumar
Active Contributor
0 Kudos

Where did you place the reset formula?

It should be on Group header 1 if you want the Running Total to reset for each new GH1.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

I kept my formula in GF 2 . So I kept reset formula in GH 2 .But not working

abhilash_kumar
Active Contributor
0 Kudos

Reset should be on GH1

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

I tried but still not working.

abhilash_kumar
Active Contributor
0 Kudos

Could you send me the report with saved data please?

-Abhilash

Former Member
0 Kudos

Hi Abhi,

I sent mail Please check

abhilash_kumar
Active Contributor
0 Kudos

Divya,

The formula works fine.

Please create the last formula from my earlier reply and place it on the Report Footer - this displays the Grand Total.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Grand total 12938 is coming.

But why the running total is not coming for groups ?

Please help

abhilash_kumar
Active Contributor
0 Kudos

The Running Total is also showing up for the groups.

You have a reset formula on GH1. Notice how it 'resets' on each new GH1.

If you want the group sum to also keep incrementing and displaying at the same time, you would need to change the second formula to:

whileprintingrecords;

numbervar cftot;

numbervar gcftot;

if {Payments.disp_ordr}=1 or {Payments.disp_ordr}=2 then

(

     cftot:=cftot+sum({Payments.totsales},{Payments.pm_desc});

     gcftot:=gcftot+cftot;

);   


-Abhilash

Answers (0)