EsbOtlAddMember() adds a member to the outline and sets the member's attributes.
EsbOtlAddMember (hOutline, pMemberInfo, hParent, hPrevSibling, phMember)
ByVal hOutline As Long
pMemberInfo As ESB_MBRINFO_T
ByVal hParent As Long
ByVal hPrevSibling As Long
phMember As Long
| hOutline | Outline context handle. |
| pMemberInfo | Member information structure defining the member and its attributes. |
| hparent | Handle of parent. This field is used only if the hPrevSibling field is ESB_NULL. |
| hPrevSibling | Handle of previous sibling. |
| 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_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_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 | The actual Attribute value.
For an attribute dimension or zero-level (leaf node) attribute member,
set one of the following data types:
ESB_ATTRMBRDT_BOOL ESB_ATTRMBRDT_DATETIME ESB_ATTRMBRDT_DOUBLE ESB_ATTRMBRDT_STRING You may instead set a zero-level (leaf node) attribute member to ESB_ATTRMBRDT_AUTO. You may set attribute members that are not zero level to ESB_ATTRMBRDT_NONE or ESB_ATTRMBR_AUTO. |
Declare Function EsbOtlAddMember Lib "ESBOTLW"
(ByVal hOutline As Long, pMemberInfo As ESB_MBRINFO_T,
ByVal hParent As Long, ByVal hPrevSibling As Long,
phMember As Long) As Long
Sub ESB_OtlAddMember()
Dim sts As Long
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long
Dim MbrInfo As ESB_MBRINFO_T
Dim hMemberProfit As Long
Dim hNewMember As Long
Object.hCtx = hCtx
Object.Type = ESB_OBJTYPE_OUTLINE
Object.AppName = "Sample"
Object.DbName = "Basic"
Object.FileName = "Basic"
sts = EsbOtlOpenOutline(hCtx, Object, ESB_YES,
ESB_YES, hOutline)
If sts = 0 Then
sts = EsbOtlFindMember(hOutline,
"Profit", hMemberProfit)
End If
If sts = 0 And hMemberProfit <> 0 Then
MbrInfo.szMember = "Inventory"
sts = EsbOtlAddMember(hOutline, MbrInfo,
ESB_NULL, hMemberProfit, hNewMember)
End If
End Sub
EsbOtlAddDimension()
EsbOtlDeleteMember()
EsbOtlDeleteDimension()
EsbSetMemberInfo()
EsbOtlFindMember()