[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.AddDataField

AddDataField Method

AddDataField(IPivotField, string, ConsolidationFunction)

Adds a data field to a PivotTable report. Returns a PivotField object that represents the new data field.

Declaration
IPivotField AddDataField(IPivotField field, string caption, ConsolidationFunction function)
Function AddDataField(field As IPivotField, caption As String, [function] As ConsolidationFunction) As IPivotField
Parameters
Type Name Description
IPivotField field

The unique field on the server. If the source data is Online Analytical Processing (OLAP), the unique field is a cube field. If the source data is non-OLAP (non-OLAP source data), the unique field is a PivotTable field.

string caption

The label used in the PivotTable report to identify this data field.

ConsolidationFunction function

The function performed in the added data field.

Returns
Type Description
IPivotField