cancel
Showing results for 
Search instead for 
Did you mean: 

Getting cumulative value in group footer

former_member357265
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

former_member357265
Participant
0 Kudos

Hi

Please help me to sort out the above issue