I've scrapped some initial work I did using Fomulas in summaries and instead I'm trying to implement a customer summary using my own class that implements ICustomSummaryCalculator.
So far this is proving to be much easier and is producing the results I'm looking for. I do have one question however.
My data set will be grouped-by a particular column. The summary for the groups is giving me the result I want. But on the grand total line, I'd like to output a slightly different value.
It seems what I'm looking for is the ability to know in my summary class that implements ICustomSummaryCalculator if the summary it's currently calculating is for the grand total line. If I could do that I'd have the ability to say: if (isGrandTotal) return A, else return B.
Thanks!
Chris Rowland
Hi Chris,
The ICustomSummaryCalculator is called for each rows collection. I would think that for the grand total summaries when the grid is grouped, that the rows you get would be a collection of UltraGridGroupByRow objects, instead of the normal UltraGridRow. Is that not the case?
I’ve been in communication with Mike and it appears that the rows passed back to the iCustomSummaryCalculator are the ultraGridRow rows. It does not fire for the UltraGridGroupByRows.
I was wondering if you had been able to resolve your question regarding the grand totals.
I created a sample using the grand totals with multiple columns as sortedColumns and I have different values for the same summary value dependent upon which level of the groupby columns the calculation is related to.
If you could be of any assistance, please let me know.
Marianne