Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1865
SummaryDefs - Custom Summary Calculator
posted

I have created a custom summary calculator class which is RATIO of two other fields (I think, this class is correct).

I am using:

SummaryDefCustomRatioA summaryDefCustomRatioA = new SummaryDefCustomRatioA();

SummaryCalculator.Register(summaryDefCustomRatioA);

SummaryDefinition summaryDef3 = grd.FieldLayouts[0].SummaryDefinitions.Add("ratio", summaryDefCustomRatioA, "ratio");

summaryDef3.StringFormat = ": {0:P2}";

 

Since this is a custom summary, there is no SourceFieldName. However, this is not showing up - please check and help. No errors. The others where I am using SummmaryCalculator.Sum and valid SourceFieldName are working fine.

 

Thanks.

 

Parents
No Data
Reply
  • 1865
    Offline posted

    Actually, the above post is incorrect. It seems that the calculating methods of the custom summary calculator class are not being called.

    I have a check-box above my grid and when the user clicks it, I apply the SummarDef. It groups the grid rows and gives subtotals in between. So, how do I apply my custom summary calculator this way. Do I need to explicitly call the calculating methods of the custom class? How?

    Thanks.

Children