Page 1 of 1

SUM a value from multiple databands not working

Posted: Thu Jul 02, 2020 4:44 am
by charlvdb
Hi

I have multiple filtered databands from one datasource.

I want to sum the same column from different databands, but only the one databand is being summed, the other is not.
Attached is my report and a PDF printout of it currently with data, with comments for better understanding what is wrong.

Code: Select all

{Sum(DataBand2,Afford.Amount) + Sum(DataBand4,Afford.Amount)}
The report only displays the sum of Databand4,Afford.amount, DataBand2's SUM is ignored by the system.
Could you have a look to see why?

I am a registered user of stimulsoft.

Re: SUM a value from multiple databands not working

Posted: Thu Jul 02, 2020 8:05 am
by Lech Kulikowski
Hello,

In that case, you should use Totals.Sum() function.

Thank you.

Re: SUM a value from multiple databands not working

Posted: Thu Jul 02, 2020 10:40 am
by charlvdb
Many thanks Lech!
That solved my problem!

Code: Select all

{Totals.Sum(DataBand2,Afford.Amount) + Sum(DataBand4,Afford.Amount)}

Re: SUM a value from multiple databands not working

Posted: Thu Jul 02, 2020 1:50 pm
by Lech Kulikowski
Hello

We are always glad to help you!

Thank you.