Sum Column based on value change in other column

Stimulsoft Reports.NET discussion
Post Reply
Herbert
Posts: 1
Joined: Thu Nov 24, 2016 5:36 pm

Sum Column based on value change in other column

Post by Herbert »

Hi all,

I have a Report where I want to sum Column1 when the value in Column2 changes.
How can this be done in Stimulsoft Reports?

Best Regrads
Herbert
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Sum Column based on value change in other column

Post by HighAley »

Hello, Herbert.

You could use the SumDistinct() function for this.
decimal SumDistinct (object dataSource, object conditionExpression, object sumExpression)

A function returns the sum of all unique values in the specified column or expression.

Parameters
dataSource - The Data Source for processing.
conditionExpression - A condition expression to perform summing on.
sumExpression - An expression to sum up.

Return Value
A decimal number.
Please, look at the attached sample.

Thank you.
Attachments
report.mrt
(7.58 KiB) Downloaded 499 times
Post Reply