Skip to main content

Automatic Grand Totals

  • 2 minutes to read

Automatic grand totals are automatically calculated for all the data which is currently displayed in the ExpressPivotGrid control. Row grand totals are rows which display summary totals calculated against all the rows. Column grand totals are columns which display summary totals calculated against all the columns.

By default, if there are multiple data fields the ExpressPivotGrid control displays multiple column grand totals (for each data field) and a single row grand total.

To reverse the layout and display multiple row grand totals and a single column grand total, set the pivot grid’s OptionsDataField.Area property to faRow. Note that this will also display the data field anchor in the row header area.

The summary function used to calculate automatic grand totals is determined by the SummaryType property of a corresponding data field.

By default, if a single value of an outer column field is listed along the control’s top edge the column grand totals are not displayed. Similarly, the row grand totals are not displayed if a single value of an outer row field is listed along the control’s left edge. To display grand totals in this instance, set the OptionsView.GrandTotalsForSingleValues property to True.

To hide column and row grand totals, use the OptionsView.ColumnGrandTotals and OptionsView.RowGrandTotals properties.

To specify the position of grand totals and subtotals, use the OptionsView.ColumnTotalsLocation, OptionsView.RowTotalsLocation, and OptionsView.TotalsLocation properties.