Sets member attribute information.
Syntax
ESS_FUNC_M EssOtlSetMemberInfo (hOutline, hMember, pInfo);
| Parameter | Data Type | Description |
|---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle |
hMember | ESS_HMEMBER_T | Handle to member to set attributes for |
pInfo | ESS_MBRINFO_T | Member information structure |
Notes
Attributes
Three fields of the ESS_MBRINFO_T structure are for attributes only:
| Data Type | Field | Description |
|---|---|---|
| ESS_BOOL_T | fAttributed | Indicates whether a base member has attributes associated with it: either ESS_TRUE or ESS_FALSE. |
| ESS_USHORT_T | Attribute.usDataType | For an attribute dimension or zero-level (leaf node) attribute member, one of the following data types:
For any attribute member, but not an attribute dimension:
|
union ESS_BOOL_T ESS_STR_T ESS_DATETIME_T ESS_DOUBLE_T | Attribute.value bData strData dtData dblData | One of the following attribute member values:
|
Values for two fields of the ESS_MBRINFO_T structure are for attributes only:
| Data Type | Field | Description |
|---|---|---|
| ESS_USHORT_T | usCategory | One of the following dimension categories:
|
| ESS_USHORT_T | usStorageCategory | One of the following dimension storage categories:
|
Return Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_CONSOL
OTLAPI_BAD_MBRNAME
OTLAPI_BAD_MEMBER
OTLAPI_ERR_ADDNAMEUSED
OTLAPI_ERR_CURTOOMANYDIMS
OTLAPI_ERR_BADSHARE
OTLAPI_ERR_BADSKIP
OTLAPI_ERR_BADSTORAGE
OTLAPI_ERR_BADSTORAGECATEGORY
OTLAPI_ERR_BADTIMEBAL
OTLAPI_ERR_ILLEGALBOOLEAN
OTLAPI_ERR_ILLEGALCURRENCY
OTLAPI_ERR_ILLEGALDATE
OTLAPI_ERR_ILLEGALNAME
OTLAPI_ERR_ILLEGALNUMERIC
OTLAPI_ERR_ILLEGALTAG
OTLAPI_ERR_LEAFLABEL
OTLAPI_ERR_NOSHAREPROTO
OTLAPI_ERR_NOTIMEDIM
OTLAPI_ERR_SHARENOTLEVEL0
Example
#include <essapi.h>
#include <essotl.h>
ESS_STS_T sts = 0;
ESS_HOUTLINE_T hOutline;
ESS_HMEMBER_T hMemberJan;
ESS_MBRINFO_T MbrInfo;
ESS_PMBRINFO_T pMbrInfo = ESS_NULL;
ESS_OBJDEF_T Object;
ESS_APPNAME_T szAppName;
ESS_DBNAME_T szDbName;
ESS_OBJNAME_T szFileName;
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);
if (!sts)
{
sts = EssOtlFindMember(hOutline, "Jan",
&hMemberJan);
}
if (!sts && hMemberJan)
{
sts = EssOtlGetMemberInfo(hOutline,
hMemberJan, &pMbrInfo);
}
if (!sts && pMbrInfo)
{
pMbrInfo->usConsolidation = ESS_UCALC_SUB;
pMbrInfo->fTwoPass = ESS_TRUE;
pMbrInfo->fExpense = ESS_TRUE;
sts = EssOtlSetMemberInfo(hOutline,
hMemberJan, pMbrInfo);
}
if (pMbrInfo)
{
EssOtlFreeStructure(hOutline, count, structId, structPtr);
}See Also