从Sharepoint网站集上部署的pps仪表板中检索MDX

时间:2010-12-07 05:15:12

标签: sharepoint-2010 mdx performancepoint

有没有办法检索部署在sharepoint网站上的图表和报告的名称和相应的mdx查询? 我正在使用Shrepoint 2010

2 个答案:

答案 0 :(得分:1)

SharePoint Server 2010使用PPSAuthoringService Web服务而不是PmService。如果您还没有看到它,请查看PerformancePoint Services团队博客上的这篇文章:http://blogs.msdn.com/b/performancepoint/archive/2010/09/13/using-the-ppsauthoringservice-web-service.aspx

OLAP报告的查询存储在ReportView.CustomData属性中。这样的东西应该工作(即使这个例子从API调用Web服务)。警告 - 我是业余程序员。

2/4/11 - 您可以将报告位置传递给GetMdx方法,而不是查询报告的CustomData支柱,如下所示。

static void Main(string[] args)
{
    string pathToAuthoringService = "http://<serverName>/_vti_bin/PPS/PPSAuthoringService.asmx";
    IBIMonitoringAuthoring service = BIMonitoringAuthoringServiceProxy.CreateInstance(pathToAuthoringService);

    string listUrl = "/BICenter/Lists/PerformancePoint Content/";
    FirstClassElementCollection fcos = service.GetListItems(listUrl);
    Dashboard dashboard = new Dashboard();

    foreach (FirstClassElement fco in fcos)
    {
        if (fco.ContentType == FCOContentType.PpsDashboard && fco.Name.Text == "Contoso Sales Management")
        {
            dashboard = fco as Dashboard;
        }
    }

    // Or if you know the ItemUrl, you can retrieve the dashboard directly.
    //RepositoryLocation dashboardLocation = new RepositoryLocation("/BICenter/Lists/PerformancePoint Content/32._000");
    //Dashboard dashboard = service.GetDashboard(dashboardLocation);

    List<RepositoryLocation> childLocations = dashboard.GetChildFCOLocations();
    foreach (RepositoryLocation location in childLocations)
    {
        if (location.ItemType == FirstClassObjectType.ReportView)
        {
            ReportView report = service.GetReportView(location);

            if (report.IsAnalyticReport())
            {
                Console.WriteLine(report.CustomData);
        }
    }
}

}

答案 1 :(得分:0)

您可以打开PPS设计器应用程序,您可以看到仪表板上使用的图表名称,您可以从报告切换到设计模式以查看MDX。

否则,您还可以运行SQL事件探查器来跟踪从PPS发送到Analysis Services的查询。你必须要知道PPS做了很多缓存,我认为它默认是10-20分钟,所以如果你错过了第一个查询,你可能需要等待一段时间才能再次发送查询。