CornerLabels (Object)

Member of:

PivotSection object, OLAPQuerySection object

Description:

Represents the Pivot report corner labels feature. Corner labels are the names of Pivot Outliner values in the actual pivot. You can include corner labels on pivot reports and specify their position (none, top, or side).

Example 1:

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

LabelActiveDocument.Sections"Pivot"].CornerLabels.Display= BqPivotLabelDisplaySide

Example 2:

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

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

Example 3:

In this example, corner labels are displayed on both the top and side of the pivot report:

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

Example 4:

In this example, corner labels are hidden:

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

Example 5:

This example shows how to use an if...else statement to retrieve and display corner label display setting in a text box:

var display = ActiveDocument.Sections["OLAPQuery"].CornerLabels.Display
if (display  == bqPivotLabelDisplayBoth)
{
TextBox9.Text = "Both";
}
else if (display  == bqPivotLabelDisplayNone)
{
TextBox9.Text = "None";
}
else if (display  == bqPivotLabelDisplaySide)
{
TextBox9.Text = "Side";}
else if (display  == bqPivotLabelDisplayTop){
TextBox9.Text = "Top";}

Properties:

Read-write: Property Display as BqPivotLabelDisplay

Constants:

BQPivotLabelDisplay, which includes these values: