HypSetDimensions
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
HypSetDimensions() specifies an ad hoc grid layout other than the default grid by rearranging the metadata of the grid. In this function, you specify an array containing the dimension names in the grid and an array containing their corresponding types.
If HypSetDimensions() is used on an existing ad hoc report, the entire grid layout is rearranged, and comments, formulas, and formatting are lost.
Syntax
HypSetDimensions(vtSheetName, vtDimNames(), vtType())
ByVal vtSheetName() As Variant
ByRef vtDimNames() As Variant
ByRef vtType() As Variant)
Parameters
vtSheetName: Input parameter; the name of worksheet on which to run the function. If vtSheetName is Null
or Empty
, the active worksheet is used.
vtDimNames(): Input parameter; the dimension name array present in the grid
vtType(): Input parameter; the type information for the respective dimension. Possible values:
-
Row dimension (ROW_DIM) = 0
-
Column (COL) = 1
-
POV (POV) = 2
-
Page dimension (PAGE) = 3
-
User variable (USERVAR) = 5
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Example
This example assumes that the worksheet is connected.
Public Declare Function HypSetDimensions Lib "HsAddin" (ByVal vtSheetName() As Variant, ByRef vtDimNames() As Variant, ByRef vtType() As Variant) As Long
Sub Example_HypSetDimensions()
Dim dims(3) As Variant
Dim types(3) As Variant
dims(0) = "Product"
dims(1) = "Market"
dims(2) = "Scenario"
dims(3) = "Measures"
types(0) = ROW_DIM
types(1) = COL
types(2) = POV
types(3) = POV
sts = HypSetDimensions("Sheet2", dims, types)
End Sub