有没有办法知道报告是否有订阅

时间:2013-08-26 14:49:54

标签: sharepoint sharepoint-2010

我们有一个SharePoint网站,有很多报告,其中一些报告有订阅,有些报告没有。

目前,我们需要转到Manage Subscription以查看是否有任何订阅。由于我们有这么多报告,有没有一种简单的方法来判断报告是否有订阅。

1 个答案:

答案 0 :(得分:0)

我创建了一个报告,可以显示所有报告订阅的状态。也许您可以使用它来获取完整的报告列表以及与之关联的订阅。我连接到我的报告服务服务器。

SELECT    
  SubscriptionID, 
  SubscriptionOwner, 
  ModifiedDate, 
  Description, 
  EventType, 
  DeliveryExtension, 
  LastStatus, 
  LastRunTime,
  NextRunTime, 
  ScheduleName, 
  ReportPath, 
  ReportName, 
  ReportDescription
FROM    
  SubscriptionsList_v

我不记得是否创建了此视图或是否标准。这是我创建的视图

SELECT TOP (100) PERCENT 
    SUB.SubscriptionID,
    USR.UserName AS SubscriptionOwner,
    SUB.ModifiedDate, 
    SUB.Description,
    SUB.EventType,
    SUB.DeliveryExtension, 
    SUB.LastStatus, 
    SUB.LastRunTime,
    SCH.NextRunTime,
    SCH.Name AS ScheduleName,
    CAT.Path AS ReportPath, 
    REVERSE(LEFT(REVERSE(CAT.Path), CHARINDEX('/',REVERSE(CAT.Path), 1) - 1)) AS ReportName, 
    CAT.Description AS ReportDescription
FROM  
    dbo.Subscriptions AS SUB INNER JOIN
    dbo.Users AS USR ON SUB.OwnerID = USR.UserID INNER JOIN
    dbo.Catalog AS CAT ON SUB.Report_OID = CAT.ItemID INNER JOIN
    dbo.ReportSchedule AS RS ON SUB.Report_OID = RS.ReportID AND SUB.SubscriptionID = RS.SubscriptionID INNER JOIN
     dbo.Schedule AS SCH ON RS.ScheduleID = SCH.ScheduleID
ORDER BY SubscriptionOwner, ReportPath

我很确定我自己并没有写这篇文章,但可能已经把它从网上拿到了。