EssOtlAddDimension() adds a dimension to the outline and sets the member's attributes. The call also specifies a member of the new dimension to associate data with when the outline is restructured.
ESS_FUNC_M EssOtlAddDimension (hOutline, pMemberInfo, hPrevSibling, pszDataMbr, phMember);
| ESS_HOUTLINE_T | hOutline; |
| ESS_PMBRINFO_T | pMemberInfo; |
| ESS_HMEMBER_T | hPrevSibling |
| ESS_STR_T | pszDataMbr; |
| ESS_PHMEMBER_T | phMember |
| hOutline | Outline context handle. |
| pMemberInfo | Member information structure defining the member and its attributes. |
| hPrevSibling | Handle of previous sibling. If this field is ESS_NULL, the dimension becomes the first dimension in the outline. Otherwise, the dimension is placed after the dimension specified in hPrevSibling. |
| pszDataMbr | Member name of a member in the new dimension that will receive the data values when the outline is restructured. If this field is ESS_NULL, the dimension member itself is used. |
| phMember | Handle of new member returned from the API. |
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_CONSOL
OTLAPI_BAD_MBRNAME
OTLAPI_ERR_ADDDELETEDIMDYNAMICCALC
OTLAPI_ERR_ADDNAMEUSED
OTLAPI_ERR_BADSHARE
OTLAPI_ERR_BADSKIP
OTLAPI_ERR_BADSTORAGE
OTLAPI_ERR_BADSTORAGECATEGORY
OTLAPI_ERR_BADTIMEBAL
OTLAPI_ERR_CURTOOMANYDIMS
OTLAPI_ERR_ILLEGALBOOLEAN
OTLAPI_ERR_ILLEGALCURRENCY
OTLAPI_ERR_ILLEGALDATE
OTLAPI_ERR_ILLEGALNUMERIC
OTLAPI_ERR_ILLEGALTAG
OTLAPI_ERR_LEAFLABEL
OTLAPI_ERR_NONATTRDIMFOLLOWED
OTLAPI_ERR_NOSHAREPROTO
OTLAPI_ERR_NOTIMEDIM
| Field | Setting |
| usConsolidation | ESS_UCALC_NOOP |
| fTwoPass | ESS_FALSE |
| fExpense | ESS_FALSE |
| usConversion | ESS_CONV_NONE |
| usTimeBalance | ESS_TIMEBAL_NONE |
| usSkip | ESS_SKIP_NONE |
| usShare | ESS_SHARE_DYNCALCNOSTORE |
| usStorage | ESS_DIMTYPE_SPARSE |
| usCategory | ESS_CAT_ATTRIBUTE |
| usStorageCategory | ESS_STORECAT_ATTRIBUTE |
| Attribute.usDataType | One of the following attribute member data types:
ESS_ATTRMBRDT_BOOL ESS_ATTRMBRDT_DATETIME ESS_ATTRMBRDT_DOUBLE ESS_ATTRMBRDT_STRING |
#include <essapi.h>
#include <essotl.h>
ESS_STS_T sts = 0;
ESS_OUTLINEINFO_T NewInfo;
ESS_HOUTLINE_T hOutline;
ESS_MBRINFO_T MbrInfo;
ESS_HMEMBER_T hDimMeasures;
memset (&NewInfo,'\0', sizeof(NewInfo));
sts = EssOtlNewOutline(hCtx, &NewInfo,
&hOutline);
if (!sts)
{
memset(&MbrInfo, '\0', sizeof(MbrInfo));
strcpy(MbrInfo.szMember, "Measures");
MbrInfo.usStorage = ESS_DIMTYPE_SPARSE;
MbrInfo.usCategory = ESS_CAT_ACCOUNTS;
sts = EssOtlAddDimension(hOutline, &MbrInfo,
ESS_NULL, "Profit",&hDimMeasures);
}
EssOtlAddMember()
EssOtlDelete Dimension()
EssOtlDeleteMember()
EssOtlGetMemberInfo()