Jaa


HierarchyOrigin Enumeration

Describes the overall structure of a hierarchy.

Namespace: Microsoft.AnalysisServices.AdomdClient
Assembly: Microsoft.AnalysisServices.AdomdClient (in microsoft.analysisservices.adomdclient.dll)

Syntax

'Declaration
Public Enumeration HierarchyOrigin
public enum HierarchyOrigin
public enum class HierarchyOrigin
public enum HierarchyOrigin
public enum HierarchyOrigin

Members

Member name Description
AttributeHierarchy Specifies that the hierarchy is an attribute hierarchy. Note   This enumeration is not supported on versions of Analysis Services that are earlier than Microsoft SQL Server 2005 Analysis Services (SSAS).
ParentChildHierarchy Specifies that the hierarchy is a parent-child hierarchy.
UserHierarchy Specifies that the hierarchy is a user-defined hierarchy.

Example

The following subroutine examines a CellSet, listing each axis and the hierarchies contained by each axis, and then displays the HierarchyOrigin value for each Hierarchy.

    Public Sub ListHierarchyOrigins(ByRef CellSetToCheck As CellSet)
        Dim SampleAxis As Microsoft.AnalysisServices.AdomdClient.Axis
        Dim SampleHierarchy As Hierarchy

        With CellSetToCheck

            ' First, output the number of axes contained by the cellset.
            Console.WriteLine("The cellset has {0} axes.", _
                CellSetToCheck.Axes.Count)

            ' Iterate through each axis to examine the 
            ' hierarchies for each axis.
            For Each SampleAxis In CellSetToCheck.Axes
                Console.WriteLine("Axis '{0}' has {1} hierarchies.", _
                    SampleAxis.Name, _
                    SampleAxis.Set.Hierarchies.Count)

                ' Iterate through each hierarchy contained by an axis.
                For Each SampleHierarchy In SampleAxis.Set.Hierarchies
                    ' Check the HierarchyOrigin value to determine if the
                    ' hierarchy is balanced or unbalanced.
                    Dim TempString As String
                    Select Case SampleHierarchy.HierarchyOrigin
                        Case HierarchyOrigin.ParentChildHierarchy
                           TempString = "Parent/Child Hierarchy"
                        Case HierarchyOrigin.UserHierarchy
                           TempString = "User defined hierarchy"
                        Case HierarchyOrigin.AttributeHierarchy
                           TempString = "Attribute Hierarchy"
                        Case Else
                           TempString = "unknown"
                    End Select
                    Console.WriteLine("The structure for hierarchy '{0}' is {1}.", _
                        SampleHierarchy.Name, _
                        TempString)
                Next
            Next
        End With
    End Sub

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

Microsoft.AnalysisServices.AdomdClient Namespace