EsbOtlGetGenNames

Retrieves all generation names specified for a particular dimension. Generation names are explicitly added to the outline with EsbOtlSetGenName.

Syntax

EsbOtlGetGenNames (hOutline, pszDimension, ulOptions, pulCount)
ByVal hOutline     As Long
ByVal pszDimension As String
ByVal ulOptions    As Long 
      pulCount     As Long 
ParameterDescription

hOutline

Essbase outline handle.

pszDimension

The dimension to retrieve generation names for.

ulOptions

This can be one of the following values:

  • ESB_GENLEV_ALL - return default and actual generation names

  • ESB_GENLEV_ACTUAL - return only generation names that are actually defined

  • ESB_GENLEV_DEFAULT - return all default generation names. This includes the default names for generations that have an actual name.

  • ESB_GENLEV_NOACTUAL - return default generation names. This includes only the generations that don't have an actual generation name

pulCount

Return of the number of elements in the pNameArray. It is the number of generation names for the specified member.

pNameArray

An array of generation name structures for the specified dimension.

Notes

Return Value

The return value is zero if the function was successful.

Example

Declare Function EsbOtlGetGenNames Lib "ESBOTLN"
(ByVal hOutline As Long, ByVal pszDimension As String, ByVal ulOptions 
As Long, pulCount As Long) As Long

Sub ESB_OtlGetNames()
   Dim sts As Long
   Dim hOutline As Long
   Dim Object As ESB_OBJDEF_T
   Dim Dimension As String
   Dim GenOpt As Long
   Dim Count As Long
   Dim pGenName As ESB_GENLEVELNAME_T
   Dim Access As Integer
   Dim AppName As String
   Dim DbName As String
   
   AppName = "Sample"
   DbName = "Basic"
   sts = EsbSetActive(hCtx, AppName, DbName, Access)
   If sts=0 Then
     sts = EsbOtlOpenOutlineQuery(hCtx, Object, hOutline)
     '************** Get Gen Names ******************
     Dimension = "Year"
     GenOtp = ESB_GENLEV_DEFAULT
     If sts = 0 Then
        sts = EsbOtlGetGenNames(hOutline, Dimension, GenOpt, Count)
         If sts = 0 And Count <> 0 Then
          For n% = 1 To Count
          sts = EsbGetNextItem(hCtx, ESB_GENLEVELNAME_TYPE, pGenName)
             Next
         End If
     End If
   End If
End Sub

See Also