In my InitializeLayout event I set up some summaries as follows
band.Override.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed;
band.Summaries.Add("rawCost", "sum([RawCost])");
This doesnt work. No summary values get displayed.... however if I do the following....
band.Summaries.Add("rawCost",SummaryType.Sum, band.Columns["RawCost"]);
This works and displays the sum for the column raw cost. Placing the display under the RawCost column. I dont want this I want summaries displayed under the first column as such...:
Raw Cost: $5678
Final Cost: $67890
...etc...
Why does the sum([RawCost]) not work and doing SummaryType.Sum does? Don't they both do the same thing?
DOH! I forgot about adding calcmanager... that was the key~! thanks Mike!
Hello,
I attached a sample on how to reposition the the displayed summary to located underneath a different column. This can be specified in the Add method you are using.
// Add a summary and set the summary position to UseSummaryPositionColumn so that it shows up under a specified summary position column of the same band
SummarySettings summary = band.Summaries.Add(SummaryType.Sum, null, band.Columns["OptionID"], SummaryPosition.UseSummaryPositionColumn, band.Columns["Employee"]);
//Which would result in the sum of cells for OptionID would be displayed underneath the Employee column.
The first method uses a formula and the second method uses the built-in summary functionality of the grid. So the first method will fail to produce a result if you do not have an UltraCalcManager on the form to support formulas. It also might fail in rare cases if, for some reason) your grid is not hooked up to the CalcManager.