GetDescriptionAtIndex

Returns the description for a cell, given the indexes that identify the cell. GetDescriptionAtIndex also returns the member IDs of the cell’s Account, Intercompany Partner, and Custom dimension members.

Syntax

<HsvMDDataBuffer>.GetDescriptionAtIndex lCubeIndex, lPeriodIndex, lCellIndex, plAccount, plICP, plCustom1, plCustom2, plCustom3, plCustom4, pbstrDesc

Argument

Description

lCubeIndex

Long (ByVal). The index of the cell’s subcube. Use BeginEnumeration or GetCubeIndexFromPOV to determine valid index values.

lPeriodIndex

Long (ByVal). The index of the cell’s period. Use GetNumPeriodsInCubeForDescriptions or GetPeriodIndexFromPOVForDescriptions to determine valid index values.

lCellIndex

Long (ByVal). The index of the cell. Use GetNumCellsForDescriptions to determine valid index values.

plAccount

Long. Returns the member ID of the cell’s Account dimension member.

plICP

Long. Returns the member ID of the cell’s Intercompany Partner dimension member.

plCustom1

Long. Returns the member ID of the cell’s Custom 1 dimension member.

plCustom2

Long. Returns the member ID of the cell’s Custom 2 dimension member.

plCustom3

Long. Returns the member ID of the cell’s Custom 3 dimension member.

plCustom4

Long. Returns the member ID of the cell’s Custom 4 dimension member.

pbstrDesc

String. Returns the cell’s description.

Example

The following example loops through the cells in an HsvMDDataBuffer object and prints each cell’s description to Visual Basic’s Immediate window. The example assumes that the object has previously been filled with data. BeginEnumeration locks the object and returns the number of subcubes in the object. The loops then work as follows:

EndEnumeration then unlocks the HsvMDDataBuffer object.

Dim lNumCubes As Long, lNumPers As Long, lNumCells As Long
Dim lAccount As Long, lIntCo As Long, lCus1 As Long
Dim lCus2 As Long, lCus3 As Long, lCus4 As Long, sDesc As String
m_cMDBuffer.BeginEnumeration lNumCubes
For i = 0 To lNumCubes - 1
  m_cMDBuffer.GetNumPeriodsInCubeForDescriptions i, lNumPers
  For j = 0 To lNumPers - 1
    m_cMDBuffer.GetNumCellsForDescriptions i, j, lNumCells
    For k = 0 To lNumCells - 1
      m_cMDBuffer.GetDescriptionAtIndex i, j, k, lAccount, _ 
      lIntCo, lCus1, lCus2, lCus3, lCus4, sDesc
      Debug.Print sDesc
    Next k
  Next j
Next i
m_cMDBuffer.EndEnumeration