SUM a value from multiple databands not working

Stimulsoft Reports.WPF discussion
Post Reply
charlvdb
Posts: 12
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

SUM a value from multiple databands not working

Post 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.
Attachments
DocNamAffordabilityReportView.zip
(111.53 KiB) Downloaded 280 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: SUM a value from multiple databands not working

Post by Lech Kulikowski »

Hello,

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

Thank you.
charlvdb
Posts: 12
Joined: Fri Sep 01, 2017 5:59 am
Location: South Africa

Re: SUM a value from multiple databands not working

Post by charlvdb »

Many thanks Lech!
That solved my problem!

Code: Select all

{Totals.Sum(DataBand2,Afford.Amount) + Sum(DataBand4,Afford.Amount)}
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: SUM a value from multiple databands not working

Post by Lech Kulikowski »

Hello

We are always glad to help you!

Thank you.
Post Reply