Retrieves all level names specified for a particular dimension.
Syntax
ESS_FUNC_M EssOtlGetLevelNames (hOutline, pszDimension, ulOptions, pulCount, pNameArray);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Essbase outline handle. |
pszDimension | ESS_STR_T | The dimension to retrieve level names for. |
ulOptions | ESS_ULONG_T | This can be one of the following values:
|
pulCount | ESS_PULONG_T | Return of the number of elements in the pNameArray. It is the number of level names for the specified member. |
pNameArray | ESS_GENLEVELNAME_T | An array of level name structures for the specified dimension. |
Notes
The caller should free the pNameArray structure after use by calling EssFree().
This call will work for both EssOtlOpenOutline() and EssOtlOpenOutlineQuery(). The information will exist locally for both, since it is returned from the server during the EssOtlOpenOutlineQuery() call.
Return Value
The return value is zero if the function was successful.
Example
#include <essapi.h> #include <essotl.h> ESS_STS_T sts = ESS_STS_NOERR; ESS_HOUTLINE_T hOutline; ESS_OBJDEF_T Object; ESS_STR_T Dimension; ESS_ULONG_T LevOpt; ESS_ULONG_T pCount = 0, i; ESS_PGENLEVELNAME_T pNameArray = ESS_NULL; ESS_ACCESS_T Access; ESS_STR_T AppName; ESS_STR_T DbName; AppName = "Sample"; DbName = "Basic"; sts=EssSetActive(hCtx, AppName, DbName, &Access); if (sts == 0) { memset(&Object, '\0', sizeof(Object)); sts = EssOtlOpenOutlineQuery(hCtx, &Object, &hOutline); Dimension = "Year"; LevOpt = ESS_GENLEV_ALL; if (!sts) { sts = EssOtlGetLevelNames(hOutline, Dimension, LevOpt, &Count, &pNameArray); if(!sts && Count ) { for(i = 0; i<Count; i++) { printf("\nNumber %ld, Name %s ", pNameArray[i].usNumber, pNameArray[i].szName); } EssFree(hInst, pNameArray); } } }
See Also