QueryLabel (Collection)

Member of:

(CubeQuery) QuerySection object

Description:

Represents either the dimensions on the top (columns), or on the side (rows) of the data layout in a CubeQuery. Each dimension is a single “label”. The members of a dimension that are visible (that have been drilled into) are not “labels”. The text shown in the Description area refers to the axis — column or row of the data layout. If the Add (Method) is used with this object, the selected dimension is added to the axis, as the innermost label. If the Item (Method) is used with this object, a label is returned at the given index, or with the given name, if a dimension of that name is in the data layout. If the index is given as an integer, its value must be between 1 and the value returned by the Count property. If the index is not within this range, an ItemNotFound exception is thrown. If the index is given as a string, it must match one of the names of the dimensions on the axis represented by this instance of the QueryLabels interface.

Example:

This example shows how to add dimensions to the a column and row panes of the data layout:

/ Add the "Connecticut" member to the Market label (which is a top, or column
// label)
Sections["Query"].Columns["Market"].FindAndAdd("Connecticut");

// Add the "Year" dimension as a side (row) label
Sections["Query"].Rows.Add("Year");

Methods:

Add(Dimension name as string), Item value as Name or String, RemoveAll()

Property:

Read only: Count as Number