Basic Usage

This VBS code get properties of the Member object:

Response.Write "<ul>"
For intMem = 0 To cdf1.Dimensions(1).Hierarchies(1).Levels(1).Members.Count - 1
    Set mem1 = cdf1.Dimensions(1).Hierarchies(1).Levels(1).Members(intMem)
    Response.Write "<li>Hierarchy: " & mem1.Name
    Response.Write "<ul>"
    Response.Write "<li>" & "Caption: " & mem1.Caption & "</li>"
    Response.Write "<li>" & "ChildCount: " & mem1.ChildCount & "</li>"
    Response.Write "<li>" & "Children: " & mem1.Children& "</li>"
    Response.Write "<li>" & "Description: " & mem1.Description & "</li>"
    Response.Write "<li>" & "DrilledDown: " & mem1.DrilledDown & "</li>"
    Response.Write "<li>" & "LevelDepth: " & mem1.LevelDepth & "</li>"
    Response.Write "<li>" & "LevelName: " & mem1.LevelName & "</li>"
    Response.Write "<li>" & "Name: " & mem1.Name & "</li>"
    Response.Write "<li>" & "Parent: " & mem1.Parent & "</li>"
    Response.Write "<li>" & "ParentSameAsPrev: " & mem1.ParentSameAsPrev & "</li>"
    Response.Write "<li>" & "Type: " & mem1.Type 
    Response.Write "<li>" & "UniqueName: " & mem1.UniqueName & "</li>"
    For i = 0 To mem1.Properties.Count - 1
        Response.Write _ 
            "<li>" & _
            mem1.Properties(i).Name & ": " & _
            mem1.Properties(i).Value & "</li>"
    Response.Write "</ul></li>"
Response.Write "</ul>"

Object Members

Properties Collections Methods Events
  1. Caption
  2. ChildCount
  3. Children lev
  4. Description
  5. DrilledDown pos
  6. LevelDepth
  7. LevelName
  8. Name
  9. Parent lev
  10. ParentSameAsPrev pos
  11. Type lev
  12. UniqueName
  1. Properties
  1. (None)
  1. (None)

lev indicates that the property only applies if the Member object belongs to a Level object.

pos indicates that the property only applies if the Member object belongs to a Position object.

Children returns a Members collection of the next lower level in the hierarchy.

ChildCount returns a read only long integer for the number of members for which the Member object is a parent. The max value that Position(n).Member.ChildCount can return is 65,536, so if that value is returned, then the actual value may be greater. Instead of Level(n).Member.ChildCount, use Level(n).Member.Children.Count property for an accurate count.

DrilledDown returns a read only Boolean value indicating whether the member has no children on the axis, i.e. is a leaf.

Parent returns a Member object for the next higher level in the hierarchy.

ParentSameAsPrev returns a read only Boolean value indicating whether this member and the preceding have the same parent.

Type returns a read only MemberTypeEnum indicating the type of member. That is whether the member is all, formula, measure, regular, or unknown.

Here are some of the properties available through the Properties collection:

Name Description
CatalogName The name of the catalog to which this cube belongs.
ChildrenCardinality The number of children that the member has.
CubeName The name of the cube.
DimensionUniqueName The unambiguous name of the dimension.
HierarchyUniqueName The unambiguous name of the hierarchy.
LevelNumber The distance between the level and the root of the hierarchy.
LevelUniqueName The unambiguous name of the level.
MemberCaption A label or caption associated with the member.
MemberGUID The GUID of the member.
MemberName The name of the member.
MemberOrdinal The ordinal number of the member.
MemberType The type of the member.
MemberUniqueName The unambiguous name of the member.
ParentCount The count of the number of parents that this member has.
ParentLevel The level number of the member's parent.
ParentUniqueName The unambiguous name of the member's parent.
SchemaName The name of the schema to which this cube belongs.

GeorgeHernandez.comSome rights reserved