EssOtlGetGenNames() retrieves all generation names specified for a particular dimension.
ESS_FUNC_M EssOtlGetGenNames (hOutline, pszDimension, ulOptions, pulCount, pNameArray);
ESS_HOUTLINE_T | hOutline |
ESS_STR_T | pszDimension |
ESS_ULONG_T | ulOptions |
ESS_PULONG_T | pulCount |
ESS_PPGENLEVELNAME_T | pNameArray |
hOutline | Essbase outline handle. |
pszDimension | The dimension to retrieve generation names for. |
ulOptions | This can be one of the following values: ESS_GENLEV_ALL - return default and actual generation names ESS_GENLEV_ACTUAL - return only generation names that are actually defined ESS_GENLEV_DEFAULT - return all default generation names. This includes the default names for generations that have an actual name. ESS_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. |
The return value is zero if the function was successful.
#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 GenOpt; 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"; GenOpt = ESS_GENLEV_ALL; if (!sts) { sts = EssOtlGetGenNames(hOutline, Dimension, GenOpt, &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); } } }
EssFree()
EssOtlGetGenName()
EssOtlGetLevelName()
EssOtlGetLevelNames()
EssOtlOpenOutline()
EssOtlOpenOutlineQuery()