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
Parameter | Description |
---|---|
hOutline | Essbase outline handle. |
pszDimension | The dimension to retrieve generation 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 generation names for the specified member. |
pNameArray | An array of generation 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 generation name structure returned.
This call will work for both EsbOtlOpenOutline() and EsbOtlOpenOutlineQuery(). The information will exist 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 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