Page 1 of 1

error in SumIf

Posted: Tue Sep 08, 2009 12:08 pm
by mrafieian
Hi
I use this sentence in Begin Render event but get error of "No overload for method 'Sum' takes '4' arguments"

SumDebit = SumIf(GroupHeaderBand1,ACC040101.Debit,String.Compare(ACC040101.Date , ToDate) <= 0)

SumDebit and ToDate are variable.

Please help me

Tanks
Mehrdad

error in SumIf

Posted: Wed Sep 09, 2009 10:59 am
by Jan
Hello Mehrdad,

You can't use SumIf function in code. Please use following code:

Code: Select all

SumDebit = Totals.Sum(GroupHeaderBand1, String.Compare(ACC040101.Date , ToDate) <= 0 ? ACC040101.Debit : 0)
Thank you.