.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

PivotLayout.ShowRowGrandTotals Property

Gets or sets a value indicating whether grand totals should be displayed for rows in the PivotTable report.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.1.Core.dll

Declaration

bool ShowRowGrandTotals { get; set; }
Property ShowRowGrandTotals As Boolean

Property Value

Type Description
Boolean

true, to display grand totals for rows; otherwise, false.

Remarks

Use the ShowRowGrandTotals and PivotLayout.ShowColumnGrandTotals properties to display or hide grand totals for a PivotTable report. The PivotTable column displaying grand totals for rows is highlighted in the following image. The appearance of the grand total column is specified by the TableStyleElementType.LastColumn element of the style applied to the pivot table.

SpreadsheetPivotTable_GrandTotalsForRows

The following example demonstrates how to use the ShowRowGrandTotals property to hide grand totals for the PivotTable rows.

Dim worksheet As Worksheet = workbook.Worksheets("Report1")
workbook.Worksheets.ActiveWorksheet = worksheet

' Access the pivot table by its name in the collection.
Dim pivotTable As PivotTable = worksheet.PivotTables("PivotTable1")
' Add the "Region" field to the column axis area. 
pivotTable.ColumnFields.Add(pivotTable.Fields("Region"))

' Hide grand totals for rows.
pivotTable.Layout.ShowRowGrandTotals = False
See Also