Request: Aggregat functions for use in events

Stimulsoft Reports.NET discussion
Post Reply
casic
Posts: 68
Joined: Thu Jan 18, 2007 4:25 pm
Location: Germany

Request: Aggregat functions for use in events

Post by casic »

Hi there,

I'm missing aggregat functions for use in events (e.g. BeforePrintEvent of group headers/footers). Of course, I can summerize vars in databands and then use the result in group headers/footers but it would be much more easier if I could use aggregat functions :-)

Thank you,

Markus
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Request: Aggregat functions for use in events

Post by Vital »

Yes, you can't use aggregate functions in events at this moment, but you can use result of aggregate function calculation. For each totals report engine create in report code field. For example, if you use function Sum in component Text1 then in report code you can see following field:

Code: Select all

public Stimulsoft.Report.Dictionary.StiSumDecimalFunctionService Text1_Sum;
After then you can get result of calculation in event:

Code: Select all

decimal value = (decimal)Text1_Sum.GetValue();
Thank you.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Request: Aggregat functions for use in events

Post by Vital »

A set of functions for calculation of the total in events, scripts and expressions.
Following lines shows how functions can be called:
Totals.Sum(YourDataSource, expression),
Totals.Sum(YourDataBand, expression).

Functions can be passed as the DataBand and GroupHeaderBand argument.

Functions available in build start from 29, Jan.

Thank you.
Post Reply