SUM a value from multiple databands not working

Stimulsoft Reports.Wpf discussion
Post Reply
charlvdb
Posts: 7
Joined: Fri Sep 01, 2017 5:59 am

SUM a value from multiple databands not working

Post by charlvdb » Thu Jul 02, 2020 4:44 am

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 26 times
Lech Kulikowski
Posts: 2707
Joined: Tue Mar 20, 2018 5:34 am

Re: SUM a value from multiple databands not working

Post by Lech Kulikowski » Thu Jul 02, 2020 8:05 am

Hello,

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

Thank you.
charlvdb
Posts: 7
Joined: Fri Sep 01, 2017 5:59 am

Re: SUM a value from multiple databands not working

Post by charlvdb » Thu Jul 02, 2020 10:40 am

Many thanks Lech!
That solved my problem!

Code: Select all

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

Re: SUM a value from multiple databands not working

Post by Lech Kulikowski » Thu Jul 02, 2020 1:50 pm

Hello

We are always glad to help you!

Thank you.
Post Reply