HypGetAncestor
Describes the Oracle Smart View for Office VBA function, HypGetAncestor.
Cloud data provider types: Oracle Analytics Cloud - Essbase
On-premises data provider types: Oracle Essbase
Description
HypGetAncestor() returns the ancestor at any specific generation or level for the specified member.
Syntax
HypGetAncestor (vtSheetName, vtMemberName, vtLayerType, intLayerNum, vtAncestor)
ByVal vtSheetName As Variant
ByVal vtMemberName As Variant
ByVal vtLayerType As Variant
ByVal intLayerNum As Integer
ByRef vtAncestor As Variant
Parameters
vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null
or Empty
, the active worksheet is used.
vtMemberName: The member for which to retrieve information. Required; there is no default value.
vtLayerType: Input parameter: Gen or Level. If set to Null or Empty, Gen is the default.
intLayerNum: Input parameter: the level or generation number. Required.
vtAncestor: Output parameter; the name of the ancestor
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Example
Declare Function HypGetAncestor Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtMemberName As Variant, ByVal vtLayerType As Variant, ByVal intLayerNumber As Integer, ByRef vtAncestor As Variant) As Long
Sub Example_HypGetAncestor
Dim X as Long
Dim vtAncestor As Variant
X = HypGetAncestor (Empty, "100-20", "Level", 1, vtAncestor)
End Sub