EsbOtlGetLevelNames

Retrieves all level names specified for a particular dimension. Level names are explicitly added to the outline with EsbOtlSetLevelName.

Syntax

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

hOutline

Esbbase outline handle.

pszDimension

The dimension to retrieve level names for.

ulOptions

This can be one of the following values:

  • ESB_GENLEV_ALL—Return default and actual level names.

  • ESB_GENLEV_ACTUAL— Return only level names that are actually defined.

  • ESB_GENLEV_DEFAULT—Return all default level names. This includes the default names for levels that have an actual name.

  • ESB_GENLEV_NOACTUAL—Return default level names. This includes only the levels that don't have an actual level name.

pulCount

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

pulCount

An array of level name structures for the specified dimension.

Notes

Return Value

The return value is zero if the function was successful.

Example

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

Sub ESB_OtlGetLevelNames()
   Dim sts As Long
   Dim hOutline As Long
   Dim Object As ESB_OBJDEF_T
   Dim Dimension As String
   Dim LevOpt As Long
   Dim Count As Long
   Dim pLevName 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 Level Names ******************
   Dimension = "Year"
   LevOtp = ESB_GENLEV_DEFAULT
   If sts = 0 Then
     sts = EsbOtlGetLevelNames(hOutline, Dimension,
            LevOpt, Count)
      If sts = 0 And pCount <> 0 Then
        For n = 1 To Count
         sts = EsbGetNextItem(hCtx, ESB_GENLEVELNAME_TYPE, pLevName)
            Next
       End If
     End If
   End If
End Sub

See Also