I'm trying my hand at a custom aggregate class. The report is bound directly to the datasource, and I put a text box in the report footer using the custom aggregate. I was expecting the class to be instantiated once and accumulate values like all the examples show. But in tracing the code execution in VS, I find that a new instance of the class is instantiated for every row in the dataset, meaning that no actual accumlation happens in the Accumulate method.
The report has two levels of grouping, and I tried moving the text box to the footer of the inner group to see if it was an issue with being on the report footer. No difference.
Can someone from Telerik please explain this? Seems like if the function is called at the report level, there should be one instance of the class that accumulates the values for the whole bound data set. Otherwise, all the code examples you have wouldn't work (i.e. this: http://blogs.telerik.com/blogs/posts/10-04-29/dynamic-sorting-of-reporting-crosstabs-using-a-custom-aggregate-function.aspx ) because the accumulation is actually held in a class level variable.
I'm pretty confused.
The report has two levels of grouping, and I tried moving the text box to the footer of the inner group to see if it was an issue with being on the report footer. No difference.
Can someone from Telerik please explain this? Seems like if the function is called at the report level, there should be one instance of the class that accumulates the values for the whole bound data set. Otherwise, all the code examples you have wouldn't work (i.e. this: http://blogs.telerik.com/blogs/posts/10-04-29/dynamic-sorting-of-reporting-crosstabs-using-a-custom-aggregate-function.aspx ) because the accumulation is actually held in a class level variable.
I'm pretty confused.