GridPivotTable

Inheritance: java.lang.Object

public class GridPivotTable

Represents a PivotTable report on a worksheet. The PivotTable object is a member of the GridPivotTable collection. The PivotTables collection contains all the PivotTable objects on a control.

Methods

MethodDescription
addFieldToArea(int fieldType, int baseFieldIndex)Adds the field to the specific area.
addFieldToArea(int fieldType, String fieldName)Adds the field to the specific area.
calculateData()Calculates pivottable’s data to cells.
clearAllFields()clear all pivot fields.
equals(Object arg0)
fields(int fieldType)Gets the specific fields by the field type.
fields(String fieldName)Gets the specific field by the field name.
getClass()
hashCode()
notify()
notifyAll()
refreshData()Refreshes pivottable’s data and setting from it’s data source.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

addFieldToArea(int fieldType, int baseFieldIndex)

public int addFieldToArea(int fieldType, int baseFieldIndex)

Adds the field to the specific area.

Parameters:

ParameterTypeDescription
fieldTypeintGridPivotFieldType. The fields area type.
baseFieldIndexintThe field index in the base fields.

Returns: int - The field position in the specific fields.

addFieldToArea(int fieldType, String fieldName)

public int addFieldToArea(int fieldType, String fieldName)

Adds the field to the specific area.

Parameters:

ParameterTypeDescription
fieldTypeintGridPivotFieldType. The fields area type.
fieldNamejava.lang.StringThe name in the base fields.

Returns: int - The field position in the specific fields.If there is no field named as it, return -1.

calculateData()

public void calculateData()

Calculates pivottable’s data to cells.

Remarks

Cell.Value in the pivot range could not return the correct result if the method is not been called. This method caclulates data with an inner pivot cache,not original data source. So if the data source is changed, please call RefreshData() method first.

clearAllFields()

public void clearAllFields()

clear all pivot fields.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

fields(int fieldType)

public GridPivotFieldCollection fields(int fieldType)

Gets the specific fields by the field type.

Parameters:

ParameterTypeDescription
fieldTypeintGridPivotFieldType. the field type.

Returns: GridPivotFieldCollection - the specific fields

fields(String fieldName)

public GridPivotField fields(String fieldName)

Gets the specific field by the field name.

Parameters:

ParameterTypeDescription
fieldNamejava.lang.Stringthe field name.

Returns: GridPivotField - the specific field

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

refreshData()

public void refreshData()

Refreshes pivottable’s data and setting from it’s data source.

Remarks

We will gather data from data source to a pivot cache ,then calcualte the data in the cache to the cells. This method is only used to gather all data to a pivot cache.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int