Saturday, February 25, 2012

process analysis server objects from web via ASP.NET + C#

Hi!

We are running several Analysis Services Cubes on a Database Server (SQL 2005) machine.

Another machine is our web server (IIS, ASPX) which displays cube

content and allows drill down to several levels. Everything works fine

and we are looking forward to optimizing the whole data management

process. At the moment we try to develop DTS packeges (SQL 2005).

Is it possible to initiate a cube processing (without DTS in the background) from eg an administration section in the web page?

TIA and kind regards from Vienna

JohnnyR

You can use AMO (Microsoft.AnalysisServices.dll from "%ProgramFiles%\Microsoft SQL Server\90\SDK\Assemblies"). If IIS impersonates the current user, then AMO code from the administration aspx page would also connect to AS2005 as that user. The user needs read permission for the Database and read+process permissions for the Cube.

Sample code:

using Microsoft.AnalysisServices;

...

Server server = new Server();
server.Connect("localhost");
try
{
server.Databases["the ID of the database"].Cubes["the ID of the cube"].Process();
}
finally
{
server.Disconnect();
}

You can also get processing notifications with AMO, to display progress on the administration page; more details here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=75148&SiteID=1

Adrian Dumitrascu

|||

Hi,

I have created an analysis services project using SQL Server 2005, in which I have included a cube, dimension, data source and data view. Now using the Analysis services Browser tab of cube I can see the Pivot table exactly the way I want where I can drag & drop table fields as per my requirements. But I am struggling to display the same cube over the Web. Can any please tell me that how I can publish the contents of Cube i.e. Pivot table on a web application so that end user can use this. I want the same functionality, which I can see in the Browser tab of Cube in AS2005 i.e. user should have freedom to drag & drop the fields exactly like in Excel Pivot table.

Any help would be highly appreciated.

Thanks in advance.

|||

The control used in the browser is the Office Web Components 11.0 PivotTable control.

You can use this control in your asp.net app by referencing this control in the COM tab.

As to how to use it.. documentation is sparse, so I'd just do a search on the web.

Alternatively, you could host thepivot table in an Excel spread sheet and publish that as a web page... use Excel 2007 for the best experience... again, do a search on Excel services.

Otherwise, there are true .NEt controls, such as those produced by RadarSoft

No comments:

Post a Comment