Sorts the children of an outline member.
Syntax
EsbOtlSortChildren (hOutline, hParent, usType) ByVal hOutline As Long ByVal hParent As Long ByVal usType As Integer
Parameter | Description |
---|---|
hOutline | Outline context handle. |
hParent | Handle of parent of the children to sort. If this is ESB_NULL, the dimensions are sorted. |
usType | Sort type. This can be one of the following:
|
Return Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_BAD_SORTTYPE
OTLAPI_BAD_SORTCOMPAREFUNC
OTLAPI_SORT_TOOMANY
Example
Declare Function EsbOtlSortChildren Lib "ESBOTLW" (ByVal hOutline As Long, ByVal hParent As Long, ByVal usType As Integer) As Long Sub ESB_OtlSortChildren() Dim sts As Long Dim Object As ESB_OBJDEF_T Dim hOutline As Long Dim hParent 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", hParent) End If If sts = 0 And hParent <> 0 Then sts = EsbOtlSortChildren(hOutline, hParent, ESB_SORT_DESCENDING) End If End Sub
See Also