HypGetDimMbrsForDataCell
Cloud data provider types: Oracle Analytics Cloud - Essbase, Planning, Planning Modules, Financial Consolidation and Close, Tax Reporting
On-premises data provider types: Oracle Essbase, Oracle Hyperion Planning, Oracle Hyperion Financial Management
Description
HypGetDimMbrsForDataCell() retrieves the entire set of dimension members for a data cell. These members must be in the grid.
Syntax
HypGetDimMbrsForDataCell (vtSheetName, vtCellRange, vtServerName, vtAppName, vtCubeName, vtFormName, vtDimensionNames, vtMemberNames)
ByVal vtSheetName As Variant
ByVal vtCellRange As Variant
ByRef vtServerName As Variant
ByRef vtAppName As Variant
ByRef vtCubeName As Variant
ByRef vtFormName As Variant
ByRef vtDimensionNames As Variant
ByRef vtMemberNames As Variant
Parameters
vtSheetName: Input variable; the name of worksheet on which to run the function. If vtSheetName is Null
or Empty
, the active worksheet is used.
vtCellRange: Input variable; the range of the cell (one cell only)
vtServerName: Output variable; the name of the server the associated connection on the sheet is connected to
vtAppName: Output variable; the name of the application the associated connection on the sheet is connected to
vtCubeName: Output variable; the name of the cube associated connection on the sheet is connected to
vtFormName: Output variable; the name of the form the associated connection on the sheet is connected to (in ad hoc grids, this is returned as an empty string)
vtDimensionNames: Output variable; the array of dimension names
vtMemberNames: Output variable; the array of member names
Return Value
Returns 0 if successful; otherwise, the appropriate error code.
Example
In order to run the example below, the defined sheet in oSheetName
must contain a valid grid, and the cell or cell range defined in oSheetDisp.Range
must be a valid data cell within a grid.
Public Declare Function HypGetDimMbrsForDataCell Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtCellRange As Variant, ByRef vtServerName As Variant, ByRef vtAppName As Variant, ByRef vtCubeName As Variant, ByRef vtFormName As Variant, ByRef vtDimensionNames As Variant, ByRef vtMemberNames As Variant) As Long
Sub Example_HypGetDimMbrsForDataCell()
Dim oRet As Long
Dim oSheetName As String
Dim oSheetDisp As Worksheet
Dim vtDimNames As Variant
Dim vtMbrNames As Variant
Dim vtServerName As Variant
Dim vtAppName As Variant
Dim vtCubeName As Variant
Dim vtFormName As Variant
Dim lNumDims As Long
Dim lNumMbrs As Long
Dim sPrintMsg As String
oSheetName = "Sheet1"
Set oSheetDisp = Worksheets("Sheet1")
oRet = HypGetDimMbrsForDataCell("", oSheetDisp.Range("valid data cell"), vtServerName, vtAppName, vtCubeName, vtFormName, vtDimNames, vtMbrNames)
If (oRet = SS_OK) Then
If IsArray(vtDimNames) Then
lNumDims = UBound(vtDimNames) - LBound(vtDimNames) + 1
End If
If IsArray(vtMbrNames) Then
lNumMbrs = UBound(vtMbrNames) - LBound(vtMbrNames) + 1
End If
sPrintMsg = "Number of Dimensions = " & lNumDims & " Number of Members = " & lNumMbrs & " Cube Name - " & vtCubeName
MsgBox (sPrintMsg)
End If
End Sub