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
ParameterDescription

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.

Notes

Return Value

Returns 0 if successful; otherwise one of the following:

Example

Declare Function EsbOtlAddDimension Lib "ESBOTLN" 
(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