Skip to Content
avatar image
Former Member

Getting cumulative value in group footer

Hi;

I am having the data as below

Period Value

01 10

01 20

02 100

03 200

I want the cumulative value for the field VALUE and want to keep that in the group footer. I had grouped the data on the basis of the PERIOD. On the group header I had given the below code

whileprintingrecords;
shared numbervar CBase := 0;

To get the cumulative value I gave the below code and kept the formula in the details section

whileprintingrecords;
shared numbervar CBase;
if CONDITION then
CBase := CBase + {@InvoiceBalance};

In the detail section it shows the correct value but when I keep the above formula in the group footer it adds up the last value of the group.

I get the result as

01 02

50 500

I want to get as

01 02

30 300

Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 02, 2017 at 07:47 AM

    Hi Sreejith,

    1. Remove the formula you placed on the Group Footer.

    2. Create a new formula with this code and place this on the Group Footer:

    shared numbervar CBase;

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 02, 2017 at 03:58 AM

    Hi

    Please help me to sort out the above issue

    Add comment
    10|10000 characters needed characters exceeded