Action
ExecuteMDX
Description
Executes an MDX statement and shows it in the grid.
Examples
Dim MDX As String
With OlapXApp1
.interactive = False
MDX = "SELECT"
MDX = MDX & " NON EMPTY DESCENDANTS([Customers].[All Customers], [Customers].[Country], SELF_AND_BEFORE) ON AXIS(0),"
MDX = MDX & " NON EMPTY DESCENDANTS([Education Level].[All Education Level], [Education Level].[Education Level], SELF_AND_BEFORE) ON AXIS(1)"
MDX = MDX & " From [Sales]"
MDX = MDX & " WHERE ([Gender].[All Gender], [Marital Status].[All Marital Status], [Measures].[Unit Sales], [Product].[All Products], [Promotion Media].[All Media], [Promotions].[All Promotions], [Store].[All Stores], [Store Size in SQFT].[All Store Size in SQFT], [Store Type].[All Store Type], [Time].[1997], [Yearly Income].[All Yearly Income])"
.MDX = MDX
Call .DoAction("ExecuteMDX")
End With
Example Explanation
Turns interactive mode off, defines an MDX expression and shows it in the grid.
See also
Interactive
In Interactive mode off, the user can't interact with the cube, just see its results.
MDX
Defines an MDX instruction to execute
Notes
Your MDX instruction must refer the opened cube.