Hai,
I am using wingrid for my application.. How to give the formula for summary row for One column based on other column condition..
I am using Two column.. Colum A and Column B.. I Need Sum of column B When Column A contains the value A.. I have written the following.. But Incorrect type of arguments or Oprend Error Raised.. Please Give me the solution...
UltraGrid1.DisplayLayout.Bands(0).Summaries("Summary").Formula = "SUM(IF(([A] = 'A'),[B],0))"
UltraGrid1.DisplayLayout.Bands(0).Summaries("Summary").DisplayFormat = "Total= {0}"
Regards
Suresh
Hi Suresh,
I don't think you can do this with a single formula. What I would do is add an unbound column (C) to the grid. Set a formula on this column like:
"if( [A] = 'A', [B], 0)"
Then you can sum this unbound column for your summary:
"sum([C])"
Hi..
Thanks for reply.. Is any other way for giving in single formula..
You could create a CustomSummary calculator that doesn't use formulas at all. Believe there is an example in the help of doing so or perhaps in a knowledgebase article.
Nick
That's what I ended up doing. Thanks for the reply.