Skip to Content
author's profile photo Former Member
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.

Please help

PFA

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

Assigned Tags

Related questions

1 Answer

  • Best Answer
    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

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.