EssOtlSetLevelName() sets the name for a specific level within a dimension.
ESS_FUNC_M EssOtlSetLevelName (hOutline, pszDimension, usLevel, pszName);
ESS_HOUTLINE_T | hOutline |
ESS_STR_T | pszDimension |
ESS_USHORT_T | usLevel |
ESS_STR_T | pszName |
hOutline | Outline context handle. |
pszDimension | Name of dimension that contains the level. |
usGen | Number of level for which to set a name. Leaf members are level 0. |
pszName | Name to give the level. |
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_GENLEVELNAME
OTLAPI_ERR_GENLEVELNAMEEXISTS
OTLAPI_ERR_GENLEVELEXISTS
OTLAPI_ERR_NOTADIM
OTLAPI_ ERR_GENLEVELNAMEMBR
#include <essapi.h> #include <essotl.h> ESS_STS_T sts = 0 ; ESS_HOUTLINE_T hOutline; ESS_OBJDEF_T Object; ESS_APPNAME_T szAppName; ESS_DBNAME_T szDbName; ESS_OBJNAME_T szFileName; ESS_STR_T Dimension; ESS_USHORT_T LevelNum; ESS_STR_T LevelName; memset(&Object, '\0', sizeof(Object)); Object.hCtx = hCtx; Object.ObjType = ESS_OBJTYPE_OUTLINE; strcpy(szAppName, "Sample"); strcpy(szDbName, "Basic"); strcpy(szFileName, "Basic"); Object.AppName = szAppName; Object.DbName = szDbName; Object.FileName = szFileName; sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE, ESS_TRUE, &hOutline); /************* Set Level Name **************/ Dimension = "Year"; LevelNum = 1; LevelName = "Qtr 1 2 3"; if (!sts) { sts = EssOtlSetLevelName(hOutline, Dimension, LevelNum, LevelName); }