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);
ParameterData TypeDescription

hOutline;

ESS_HOUTLINE_T

Outline context handle.

pMemberInfo;

ESS_MBRINFO_T

Member information structure defining the member and its attributes.

hPrevSibling

ESS_HMEMBER_T

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;

ESS_STR_T

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

ESS_PHMEMBER_T

Handle of new member returned from the API.

Notes

Return Value

Returns 0 if successful; otherwise one of the following:

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