Totals with condition

Stimulsoft Reports.NET discussion
Post Reply
Worm
Posts: 1
Joined: Mon Jun 12, 2006 3:51 am

Totals with condition

Post by Worm »

I need your help. Is it possible to calculate totals with condition?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Totals with condition

Post by Edward »

Worm wrote:Is it possible to calculate totals with condition?
StimulReport.Net allows to add a condition to an aggregate function. When you add a condition to an aggregate function you should add If to this aggregate function name and additional argument with condition. For example:

Code: Select all

{SumIf(Products.UnitsInStock, Products.UnitsInStock > 0)}
this expression will return the sum of elements but every element is to be higher than zero. For the Count function:

Code: Select all

{CountIf(Products.UnitsInStock == 0)}
Post Reply