PivotDataField.GetPivotData(PivotItemReference[]) Method
Retrieves summary data for the specified items of the pivot table.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
#Declaration
CellValue GetPivotData(
params PivotItemReference[] references
)
#Parameters
Name | Type | Description |
---|---|---|
references | Pivot |
An array of Pivot |
#Returns
Type | Description |
---|---|
Cell |
A Cell |
#Remarks
Use the GetPivotData property to obtain summary data stored in a PivotTable report. The PivotItemReference objects allow you to specify the field and item pairs for which the data should be returned.
If the requested data cannot be retrieved, the GetPivotData method returns the #REF! error.
The following examples demonstrate how the GetPivotData property works. All examples refer to the pivot table shown in the image below.
Example | Result |
---|---|
Returns the numeric value 148232, which is the grand total of all values in the pivot table. | |
Returns the numeric value 67249, which is the grand total for the first quarter. | |
| Returns the numeric value 46070, which is the total of the dairy product sales for the first quarter. |
| Returns the numeric value 8652, which is the value of the dairy product sales for the “Big Foods” customer in the first quarter. |
Returns the #REF! error value because there is no total value of sales for the “Big Foods” customer. | |
Returns the #REF! error value because the sales data for the third quarter is not shown in the pivot table. |