Calculation of totals procedure
If you want to calculate the value of an aggregate function in StimulReport.Net you should use events of components. For successful calculation you must have three events: start of the report rendering (initialization of the aggregate function), one element of rendering (processing of one string), and the end of the report rendering (calculation of totals output).
Usually, for making all calculations, the report generator uses the BeginRender, Rendering, and EndRender events of the Data band. But sometimes other situations can be. For example, if you want to calculate totals of a group you use the BeginRender and the EndRender events of the GroupHeader band. Also you may combine, for example, initialization and calculations in events of the Data band and use the EndRender event of a report for an output of the result of calculation. Such a scheme increases the flexibility when calculation of the aggregate functions and allows to make all calculations in one operation.