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
Parameter | Description |
---|---|
hOutline | Esbbase outline handle. |
pszDimension | The dimension to retrieve level names for. |
ulOptions | This can be one of the following values:
|
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
The caller should free the pNameArray structure after use by calling EsbFree().
The programmer should call EsbGetNextItem() once for each level name structure returned.
This call will work for both EsbOtlOpenOutline() and EsbOtlOpenOutlineQuery(). The information exists locally for both, since it is returned from the server during the EsbOtlOpenOutlineQuery() call.
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