有没有办法检索图表的名称和相应的MDX查询以及部署在SharePoint站点上的报告?
我正在使用Shrepoint 2010

有帮助吗?

解决方案

SharePoint Server 2010使用PPSAuthoringService Web服务而不是PMService。如果您还没有看到它,请在PerformancePoint服务团队博客上查看此帖子: http://blogs.msdn.com/b/performancepoint/Archive/2010/09/13/ususe-the-pppsauthoringservice-web-service.aspx

OLAP报告的查询存储在ReportView.customdata属性中。这样的事情应该起作用(即使此示例从API调用Web服务)。警告 - 我是业余程序员。

2/4/11-您只需将报告位置传递到GETMDX方法,而不是查询报告的CustomData Prop。

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);
        }
    }
}

}

其他提示

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

否则,您还可以运行SQL Profiler来跟踪从PPS发送到分析服务的查询。您必须知道PPS可以使用很多缓存,我认为默认情况下是10-20分钟,因此,如果您错过了第一个查询,则可能需要等待一段时间,然后再发送查询。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top