PivotItem
PivotItem class
Represents a item in a PivotField report.
class PivotItem;
Properties
| Property | Type | Description |
|---|---|---|
| isHidden | boolean | Gets and Sets whether the pivot item is hidden. |
| position | number | Specifying the index of this item in all the PivotItems of the field. |
| positionInSameParentNode | number | Specifying the position index in the PivotItems under the same parent node. |
| isDetailHidden | boolean | Gets and sets whether the detail of this pivot item is hidden. |
| isCalculatedItem | boolean | Readonly. Indicates whether this pivot item is a calculated formula item. |
| isMissing | boolean | Readonly. Indicates whether the item was removed from the data source. |
| value | VObject | Readonly. Gets the value of the pivot item |
| name | string | Gets the name of the pivot item. |
| index | number | Gets the index of the pivot item in cache field. |
Methods
| Method | Description |
|---|---|
| move(number, boolean) | Moves the item up or down |
| move(number) | Moves the item up or down in the pivot field |
| getFormula() | Gets the formula of this calculated item. Only works when this item is a calculated item. |
| getStringValue() | Gets the string value of the pivot item If the value is null, it will return "" |
| getDoubleValue() | Gets the double value of the pivot item If the value is null or not number ,it will return 0 |
| getDateTimeValue() | Gets the date time value of the pivot item If the value is null ,it will return DateTime.MinValue |
isHidden
Gets and Sets whether the pivot item is hidden.
isHidden : boolean;
position
Specifying the index of this item in all the PivotItems of the field.
position : number;
positionInSameParentNode
Specifying the position index in the PivotItems under the same parent node.
positionInSameParentNode : number;
Remarks
NOTE: This method is now obsolete. Instead, please use PivotTable.MoveItem(PivotFieldType, string[],bool,int) method instead. This method will be removed 12 months later since November 2026. Aspose apologizes for any inconvenience you may have experienced.
isDetailHidden
Gets and sets whether the detail of this pivot item is hidden.
isDetailHidden : boolean;
isCalculatedItem
Readonly. Indicates whether this pivot item is a calculated formula item.
isCalculatedItem : boolean;
isMissing
Readonly. Indicates whether the item was removed from the data source.
isMissing : boolean;
Remarks
True means this value has been removed from the data source.
value
Readonly. Gets the value of the pivot item
value : VObject;
name
Gets the name of the pivot item.
name : string;
index
Gets the index of the pivot item in cache field.
index : number;
Remarks
NOTE: This property is now obsolete. Instead, please use PivotItem.Position property . This method will be removed 6 months later since August 2026. Aspose apologizes for any inconvenience you may have experienced.
move(number, boolean)
Moves the item up or down
move(offset: number, isSameParent: boolean) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| offset | number | The number of moving up or down. /// Move the item up if this is less than zero; /// Move the item down if this is greater than zero. |
| isSameParent | boolean | Specifying whether moving operation is in the same parent node or not |
Remarks
NOTE: This method is now obsolete. Instead, please use PivotTable.MoveItem(PivotFieldType, string[],bool,int) or PivotItem.Move(int) method instead. This method will be removed 12 months later since November 2026. Aspose apologizes for any inconvenience you may have experienced.
move(number)
Moves the item up or down in the pivot field
move(offset: number) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| offset | number | The number of moving up or down. /// Move the item up if this is less than zero; /// Move the item down if this is greater than zero. |
getFormula()
Gets the formula of this calculated item. Only works when this item is a calculated item.
getFormula() : string;
getStringValue()
Gets the string value of the pivot item If the value is null, it will return ""
getStringValue() : string;
getDoubleValue()
Gets the double value of the pivot item If the value is null or not number ,it will return 0
getDoubleValue() : number;
getDateTimeValue()
Gets the date time value of the pivot item If the value is null ,it will return DateTime.MinValue
getDateTimeValue() : Date;