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
80
Summary conditional
posted

How do i go about getting the summary sum of a column based on the values of other columns

I have something like this in the code

var totalValue1 = tempBand.Summaries.Add(@"sum(if([Selected]=1, [Price], 0))", SummaryPosition.UseSummaryPositionColumn, tempBand.Columns["Price"]);
totalValue1.DisplayFormat = "{0:C}";
totalValue1.Appearance.TextHAlign = HAlign.Left;
totalValue1.SummaryDisplayArea = SummaryDisplayAreas.RootRowsFootersOnly | SummaryDisplayAreas.BottomFixed;

The code above does not work at all. I have tried to put == instead of =, '1' instead of 1 to no avail. Also tried using .Formula then setting the SummaryType to Formula. Again, Nothing. The code works however if I do not have any formula in it but it will sum everything in the column.

Tried to also look for some documentation on the correct syntax for the formulas in infragistics but found nothing I can use. So can you please tell me how this works and point me to the documentation with the syntax spec.

Thank you