using aggregate functions in Headerbands

Stimulsoft Reports.NET discussion
Post Reply
mrafieian
Posts: 8
Joined: Tue Jun 16, 2009 12:53 am

using aggregate functions in Headerbands

Post by mrafieian »

Hi
I use the following code in Report event or in GroupHeaderBand event , but it dosen't work , generaly may I use aggerage functions in any part of report specialy in Report load or GroupHeaderbands(befor DataBand) ?

I use this sentence in begin render of report :
SumCreditPage = Totals.Sum(DataTable, (String.Compare(ACC040101.Date , FromDate) <= 0) ? ACC040101.Credit : 0);

Tanks
Mehrdad
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

using aggregate functions in Headerbands

Post by Jan »

Hello Mehrdad,

If you want calculate totals based on groups you should use following code:

Code: Select all

SumCreditPage = Totals.Sum(YourGroupHeaderBand, (String.Compare(ACC040101.Date , FromDate) <= 0) ? ACC040101.Credit : 0);
Thank you.
Post Reply