LevelList Property
Syntax
AdvancedQuery.LevelList
Applies To
Discussion
Use this property to display a list of levels that you specified in the AdvancedQuery subset definition using the Levels method.
When users drill down on a dimension, they drill down on categories from one level to another. The Levels method returns objects that represent all the levels available in a dimension, starting from the top-level category, for a specified path. You can then use this property to display each of these categories. For example, you may have the following categories at the Country or Region level belonging to Europe:
- Belgium
- Germany
- Spain
- Sweden
- United Kingdom
- France
- Italy
The Levels method returns the categories at this level; however, it is the LevelList property that displays the levels specified within the subset definition.
Type
String
Access
Read
Example
This example creates an AdvancedQuery (type 3) subset definition that retrieves all categories at the Country or Region level belonging to Europe. The resulting subset is then added to the report as rows. The MsgBox uses the LevelList property to display the levels specified within the subset definition.
Sub Main()
Dim strCubePath As String
Dim objPPRep As Object
Dim objAdvanced As Object
strCubePath = "C:\Cubes and Reports\Great Outdoors.mdc"
Set objPPRep = CreateObject("CognosPowerPlay.Report")
objPPRep.New strCubePath, 1
objPPRep.ExplorerMode = False
objPPRep.Visible = True
Set objAdvanced = objPPRep.ReportQueries.Add(3)
With objAdvanced
.Name = "European Countries"
.Dimension = "Locations"
.Level "Country"
.Include "Europe"
.Execute
.AddToReport 1,1,3
End With
Msgbox "Name: " & objAdvanced.Name & chr$(10)
& _
"Dimension: " & objAdvanced.Dimension &
chr$(10) & _
"Level List: " & objAdvanced.LevelList &
chr$(10) & _
"Query Type Code: " & objAdvanced.Type &
chr$(10) & _
"Number of Categories: " & objAdvanced.Count
& _
chr$(10) & _
"First Category: " & objAdvanced.Item(1).Name,
_
,"Subset"
Set objAdvanced = Nothing
Set objPPRep = Nothing
End Sub