Process SSAS cube through c# code

牧云@^-^@ 提交于 2019-12-12 08:17:01

问题


I want to use SSAS cube to get data from Dynamics AX and Pass data to wpf Devexpress PivotGrid. I am using following order in AX to create cube: Perspective-->View-->Query(with arguments) Now when I change the arguments of query everytime I have to Process the cube manually and render the data. I want that process to be done through c# code automatically. i had tried below code

Server server = new Server();
server.Connect(cubeConnectionString);

Database database = server.Databases.FindByName(databaseName);
Cube cube = database.Cubes.FindByName(cubeName);

cube.Process(ProcessType.ProcessFull);

but it is not working. Can anyone help??


回答1:


I am not knowing what the error you are getting. To process cube from C# the code you have used seems correct but might you have missed something in connection string. For Reference you can download sample project provided in this link.

Process Cube dynamically in c#

Code which I had used to process my cube database is like below...

 Server server = new Server();

 server.Connect("Data source=YourSSASServerName;Timeout=7200000;Integrated Security=SSPI");

 Database database = server.Databases.FindByName("YourCubeDBName");

 database.Process(ProcessType.ProcessFull);


来源:https://stackoverflow.com/questions/24575563/process-ssas-cube-through-c-sharp-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!