QueryLabel collection
Represents a dimension in an instance of a QueryLabel collection. Each dimension label represents a dimension, and not a member of the dimension. If a CubeQuery has the Year dimension on the side and the Region dimension across the topic, it has only one entry in Rows (Year) and one entry in Columns (Region).
Select Method and Property Descriptions:
Where fully qualified member names are required, the format must be “Lev1.Lev2…”, eg “Qtr1.Jan”, or “East.New York”. Notice the dimension name is not required (it is already known from the fact the label represents a dimension). Fully qualified member names must include all levels of the member hierarchy.
When the Variable (Property) is read, the QueryLabel object returns if this label is variable or not. Variable labels display the Member Selection dialog when the query is processed. When set to “true”, this label is marked as variable.
The Add (Method) adds a specified member to the label. The MemberLocation argument must be the fully qualified member name, with each level separated by a period (for example, Year.Qtr1.Jan).
If an alias table is in use, the member must be specified using the aliases, for example, "Year.Quarter1.January", not "Year.Qtr1.Jan".
Wildcards may not be used. The FindAndAdd (Method) can be used to add members using wildcards.
The SelectorType argument specifies what type of MemberSelector is created and equates to the right-click menu in the Member Selection dialog. The bqOlapSelector enumeration contains values for Member, Children, Descendants, Bottom, Siblings, Same Level, and Same Generation. The IncludeSelf argument means the member given in the Member argument is included as well as any members generated by the SelectorType. For example, if "Qtr1" is added on the Year label with a SelectorType of bqOlapSelectorChildren, and if if IncludeSelf is true four members will be added (Qtr1, Jan, Feb, Mar) but only three members are added if IncludeSelf is false (Jan, Feb, Mar).
The IncludeSelf argument only affects the result when SelectorType is bqOlapSelectorChildren, bqOlapSelectorDescendants, or bqOlapSelectorBottom. An ItemNotFound exception will be thrown if the member does not exist at the location specified.
Note: | The Add (Method) does not support the Select Next/Previous, Subset, and Dynamic Time Series selectors. |
This example shows how to add different types of members to the “Year” dimension:
// Add the Qtr1.Jan member, left off IncludeSelf argument because it // is ignored for this selector type Sections["Query"].Rows["Year"].Add("Qtr1.Jan", bqOlapSelectorMember); // Add Jan, Feb, Mar members Sections["Query"].Rows["Year"].Add("Qtr1", bqOlapSelectorChildren, false); // Add Qtr1, Jan, Feb, Mar members Sections["Query"].Rows["Year"].Add("Qtr1", bqOlapSelectorChildren, true); Sections["Query"].Rows["Year"].Add("Year", bqOlapSelectorBottom, true);
This example shows how to find and add member 100 – 200 to the member selector:
// Add the first instance of member 100-20 to the Product label. Sections["Query"].Columns["Product"].FindAndAdd("100-20"); // Add all instances of member 100-20 to the Product label. Sections["Query"].Columns["Product"].FindAndAdd("100-20", true); // Add all instances of members starting with 100- to the Product label. Sections["Query"].Columns["Product"].FindAndAdd("100-*", true); // Assuming an alias table is in use, add all instances of members // starting with "Cola" to the Product label. Sections["Query"].Columns["Product"].FindAndAdd("Cola*", true);
Add(MemberLocation as String, SelectorType as BqOLAPSelector, IncludeSelf as Boolean), AutoSizeHeight(), AutoSizeWidth(), Find(MemberName as String, IncludeSharedMembers as Boolean), FindAndAdd(MemberName as String, AddAll as Boolean)
Read only: Name as String,
Read-writeVariable as Boolean