Skip to Content
0

Getting cumulative value in group footer

May 01, 2017 at 11:32 AM

22

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Abhilash Kumar
May 02, 2017 at 07:47 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member May 02, 2017 at 03:58 AM
0

Hi

Please help me to sort out the above issue

Share
10 |10000 characters needed characters left characters exceeded