Former Member

# running total

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.

PFA

Untitled.png (236.0 kB)
##### Add a comment
10|10000 characters needed characters exceeded

### Related questions

Posted on Mar 25, 2015 at 10:32 AM

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

##### Add a comment
10|10000 characters needed characters exceeded
• Abhilash Kumar Former Member

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