EsbOtlAddDimension() adds a dimension to the outline and sets the member's attributes.
EsbOtlAddDimension (hOutline, pMemberInfo, hPrevSibling, pszDataMbr, phMember)
ByVal hOutline As Long pMemberInfo As ESB_MBRINFO_T ByVal hPrevSibling As Long ByVal pszDataMbr As String phMember As Long
hOutline | Outline context handle. |
pMemberInfo | Member information structure defining the member and its attributes. |
HPrevSibling | Handle of previous sibling. If this field is ESB_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 ESB_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:
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 | ESB_UCALC_NOOP |
fTwoPass | ESB_FALSE |
fExpense | ESB_FALSE |
usConversion | ESB_CONV_NONE |
usTimeBalance | ESB_TIMEBAL_NONE |
usSkip | ESB_SKIP_NONE |
usShare | ESB_SHARE_DYNCALCNOSTORE |
usStorage | ESB_DIMTYPE_SPARSE |
usCategory | ESB_CAT_ATTRIBUTE |
usStorageCategory | ESB_STORECAT_ATTRIBUTE |
Attribute | Attribute value. One of the following attribute member data types:
ESB_ATTRMBRDT_BOOL ESB_ATTRMBRDT_DATETIME ESB_ATTRMBRDT_DOUBLE ESB_ATTRMBRDT_STRING |
Declare Function EsbOtlAddDimension Lib "ESBOTLW" (ByVal hOutline As Long, pMemberInfo As ESB_MBRINFO_T, ByVal hPrevSibling As Long, ByVal pszDataMbr As String, phMember As Long) As Long Sub ESB_OtlAddDimension() Dim sts As Long Dim NewInfo as ESB_OUTLINEINFO_T Dim hOutline As Long Dim MbrInfo As ESB_MBRINFO_T Dim hDimMeasures As Long NewInfo.usOutlineType = ESB_DBTYPE_NORMAL NewInfo.fCaseSensitive = ESB_FALSE NewInfo.fAutoConfigure = ESB_TRUE sts = EsbOtlNewOutline(hLocalCtx, NewInfo, hOutline) If sts = 0 Then MbrInfo.szMember = "Measures" sts = EsbOtlAddDimension(hOutline, MbrInfo, ESB_NULL, "Profit", hDimMeasures) End If End Sub
EsbOtlAddMember()
EsbOtlDelete Dimension()
EsbOtlDeleteMember()
EsbOtlGetMemberInfo()