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
Hi IsraelTan,
I see your recent post on this thread.
Please let me know if there is anything I can help you with.
Thanks Chris! Worked like a charm although I don't like how it is implemented either. But we don't have that many rows to process (about 400) so I guess it is not so bad after all.
Hi Marianne, thank you very much for your help! =)
Have a nice week.
Regards
Ricardo Roth
Hi Ricardo,
Yes I still have my sample. I may have been adding to it since we talked last but it should be of help.
I'll attach it to this thread. Let me know if you have any questions.
Hi Marianne,
i'm wondering if you still have the sample and if you can send to me?
Thank you in advance.