EsbOtlAddDimension

Description

EsbOtlAddDimension() adds a dimension to the outline and sets the member's attributes.

Syntax

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

Parameters

hOutlineOutline context handle.
pMemberInfoMember information structure defining the member and its attributes.
HPrevSiblingHandle 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.
PszDataMbrMember 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.
phMemberHandle of new member returned from the API.

Return Value

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

Notes

Example

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

See Also

EsbOtlAddMember()
EsbOtlDelete Dimension()
EsbOtlDeleteMember()
EsbOtlGetMemberInfo()