I have the datasource that has these values:
PackageCategory Awarded To Let
Consultants 2 1
Contractors 3 0
Suppliers 2 0
Total 7 1
(image attached)
Now, how can I get the sum of values of last row in Stimulsoft? (Total)
7 + 1
lhat would be 8
I want to put in a variable, say, vTotalPackages type Decimal
How do I do it?
Great Thanks!
how to get sum of last row in datasource
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
how to get sum of last row in datasource
- Attachments
-
- dsPackages.png (4.2 KiB) Viewed 584 times
-
- Posts: 790
- Joined: Tue Sep 07, 2021 10:11 am
Re: how to get sum of last row in datasource
Hello,
Please send us a sample report with test data.
Thank you.
Please send us a sample report with test data.
Thank you.
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: how to get sum of last row in datasource
But I can't send the database, it's huge!
- dmasterplan
- Posts: 143
- Joined: Thu Mar 17, 2022 4:04 am
- Location: Philippines
Re: how to get sum of last row in datasource
I had it solved already. I just created a datasource counting the records (packages) and assigned it to a variable.
Great Thanks!
Great Thanks!
-
- Posts: 6265
- Joined: Tue Mar 20, 2018 5:34 am
Re: how to get sum of last row in datasource
Hello,
You can use the following expression:
{SumIf(DataBand, DataSourceName.Awared,DataSourceName.PackageCategory == "Total") + SumIf(DataBand, DataSourceName.ToLeft,DataSourceName.PackageCategory == "Total")}
Thank you.
You can use the following expression:
{SumIf(DataBand, DataSourceName.Awared,DataSourceName.PackageCategory == "Total") + SumIf(DataBand, DataSourceName.ToLeft,DataSourceName.PackageCategory == "Total")}
Thank you.