I have a chunk of MDX that I'd like to throw into an ASP.NET form. Hopefully just binding the results to a gridview. Are there any good links or snippets? I'm using VB.NET, but I am able to port from C# if no Visual Basic code is available.
2 Answers
There is a way to execute MDX withing SQL, which I suppose would give you a sneaky way to bind the results to a gridview!
select top 100 * from openrowset(
'MSOLAP',
'Datasource=MyDBServerName;Initial catalog=MyCubeName',
'SELECT {dimensions(0).members} on rows,
{time.defaultmember} on columns
from sales'
)
There is a proper way of course (used to be called ADOMD in classic ASP, which gave you a Cellset object you could loop around).
Many people use a third-party .NET component, such as the one by Dundas, to show tables and graphs from cube data.

- 5,895
- 7
- 43
- 64
I know this might come a "little" late, and maybe I misunderstood your question. But if you want to display a grid with the results from MDX queries you can check this sample tutorial on codeproject. I have personally tried it and it worked just fine for me. Combine it with some charting libraries and you can develop this prototype furthermore.
https://www.codeproject.com/Articles/28290/Microsoft-Analysis-Services-2005-Displaying-a-grid
It will basically help you build and understand how to work with CellSets, in a practical and step by step approach. the result will more or less look like in the below picture, just a tiny bit more like 2020 :) You can easily customize it with some personal css or why not Bootstrap.

- 171
- 3
- 15