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

发布于 2024-10-06 17:00:19 字数 68 浏览 9 评论 0原文

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

Is there a way to retrieve the names and corresponding mdx queries of charts and reports deployed on a sharepoint site ?
i am using Shrepoint 2010

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

只等公子 2024-10-13 17:00:19

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

}

SharePoint Server 2010 uses the PPSAuthoringService web service instead of PmService. If you havent seen it yet, check out this post on the PerformancePoint Services team blog: http://blogs.msdn.com/b/performancepoint/archive/2010/09/13/using-the-ppsauthoringservice-web-service.aspx

The OLAP report's query is stored in the ReportView.CustomData property. Something like this should work (even though this example calls the web service from the API). Warning--I'm an amateur programmer.

2/4/11 -- Instead of querying the report's CustomData prop as shown below, you can just pass the report location to the GetMdx method.

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

}

青衫负雪 2024-10-13 17:00:19

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

否则,您还可以运行 SQL Profiler 来跟踪从 PPS 发送到 Analysis Services 的查询。您必须注意,PPS 会进行大量缓存,我认为默认情况下是 10-20 分钟,因此如果您错过了第一个查询,您可能需要等待一段时间才能再次发送查询。

You would open up the PPS designer application and you could see the names of the charts used on the dashboard and from the report you can switch to design mode to see the MDX.

Otherwise you can also run SQL Profiler to trace the queries sent from PPS to Analysis Services. You have to be aware that PPS does a lot of caching, I think it is 10-20 minutes by default so if you miss that first query you may need to wait a while before the query is sent again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文