Moves a member.
Syntax
EsbOtlMoveMember (hOutline, hMember, hNewParent, hNewPrevSibling) ByVal hOutline As Long ByVal hMember As Long ByVal hNewParent As Long ByVal hNewPrevSibling As Long
| Parameter | Description |
|---|---|
hOutline | Outline context handle. |
hMember | Handle of member to move. |
hNewParent | Handle of new parent. This field is only used if the hNewPrevSibling field is ESB_NULL. |
hNewPrevSibling | Handle of new previous sibling. |
Notes
The moved member is inserted following the hPrevSibling member. If this field is ESB_NULL, the moved member becomes the first child of the parent specified by hParent.
If both hParent and hPrevSibling are ESB_NULL, the moved member becomes the first dimension in the outline.
Moving a zero-level (leaf node) attribute member that is not of type ESB_ATTRMBRDT_STRING resets the member's long name, using the specifications for the outline in the ESB_ATTRSPECS_T structure.
Moving an ancestor may affect the long name of a zero-level attribute member.
Return Value
Returns 0 if successful; otherwise:
OTLAPI_BAD_MOVE
Example
Declare Function EsbOtlMoveMember Lib
"ESBOTLN" (ByVal hOutline As Long, ByVal hMember As Long,
ByVal hNewParent As Long, ByVal hNewPrevSibling As Long) As Long
Sub ESB_OtlMoveMember()
Dim sts As Long
Dim Object As ESB_OBJDEF_T
Dim hOutline As Long
Dim hMemberProfit As Long
Dim hFQ 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, "First Q", hFQ)
End If
If sts = 0 Then
sts = EsbOtlFindMember(hOutline, "Profit", hMemberProfit)
End If
If sts = 0 And hFQ And hMemberProfit Then
sts = EsbOtlMoveMember(hOutline, hFQ,
hMemberProfit, ESB_NULL)
End If
End SubSee Also