EssOtlAddDimension

Description

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.

Syntax

ESS_FUNC_M EssOtlAddDimension (hOutline, pMemberInfo, hPrevSibling, pszDataMbr, phMember);
ESS_HOUTLINE_ThOutline;
ESS_PMBRINFO_TpMemberInfo;
ESS_HMEMBER_ThPrevSibling
ESS_STR_TpszDataMbr;
ESS_PHMEMBER_TphMember

Parameters

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.

Return Value

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

Notes

Example

#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);
}

See Also

EssOtlAddMember()
EssOtlDelete Dimension()
EssOtlDeleteMember()
EssOtlGetMemberInfo()