Page 1 of 1

Totals with condition

Posted: Wed Jun 14, 2006 4:46 pm
by Worm
I need your help. Is it possible to calculate totals with condition?

Totals with condition

Posted: Thu Jun 15, 2006 8:10 am
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)}