DataLabels (Object)

Member of:

PivotSection object, OLAPQuery object

Description:

Represents the Pivot or OLAPQuery data labels feature. Data labels are the column and row heading on the top and sides of a pivot report and define the categories for numeric values. You can include data labels on pivot reports and specify their position (none, top, side, or both).

Example 1:

In this example, data labels are displayed on the side of the pivot report:

ActiveDocument.Sections["Pivot"].DataLabels.Display= BqPivotLabelDisplaySide

Example 2:

In this example, data labels are displayed on the top of a pivot report:

ActiveDocument.Sections["Pivot"].DataLabels.Display= BqPivotLabelDisplayTop

Example 3:

In this example, data labels are displayed on the top and side of a report:

ActiveDocument.Sections["Pivot"].DataLabels.Display= BqPivotLabelDisplayBoth

Example 4:

In this example, data labels are hidden:

ActiveDocument.Sections["Pivot"].DataLabels.Display= BqPivotLabelDisplayNone

Example 5:

In this example, data labels are hidden:

ActiveDocument.Sections["Pivot"].DataLabels.Display= BqPivotLabelDisplayNone

Properties:

Read-write: Property Display as BqPivotLabelDisplay

Constants:

BQPivotLabelDisplay, which includes these values: