{"id":1558,"date":"2016-03-03T01:25:08","date_gmt":"2016-03-02T19:25:08","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=1558"},"modified":"2016-03-03T01:25:08","modified_gmt":"2016-03-02T19:25:08","slug":"find-ssrs-reports-that-are-run","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=1558","title":{"rendered":"Find SSRS reports that are run"},"content":{"rendered":"<p>WITH RankedReports<br \/>\nAS<br \/>\n(SELECT ReportID,<br \/>\nTimeStart,<br \/>\nUserName,<br \/>\nRANK() OVER (PARTITION BY ReportID ORDER BY TimeStart DESC) AS iRank<br \/>\nFROM dbo.ExecutionLog t1<br \/>\nJOIN<br \/>\ndbo.Catalog t2<br \/>\nON t1.ReportID = t2.ItemID<br \/>\n)<br \/>\nSELECT t2.Name AS ReportName,<br \/>\nt1.TimeStart,<br \/>\nt1.UserName,<br \/>\nt2.Path,<br \/>\nt1.ReportID<br \/>\nFROM RankedReports t1<br \/>\nJOIN<br \/>\ndbo.Catalog t2<br \/>\nON t1.ReportID = t2.ItemID<br \/>\nWHERE t1.iRank = 1<br \/>\nORDER BY t1.TimeStart;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WITH RankedReports AS (SELECT ReportID, TimeStart, UserName, RANK() OVER (PARTITION BY ReportID ORDER BY TimeStart DESC) AS iRank FROM dbo.ExecutionLog t1 JOIN dbo.Catalog t2 ON t1.ReportID = t2.ItemID ) SELECT t2.Name AS ReportName, t1.TimeStart, t1.UserName, t2.Path, t1.ReportID FROM RankedReports t1 JOIN dbo.Catalog t2 ON t1.ReportID = t2.ItemID WHERE t1.iRank = 1 ORDER BY t1.TimeStart;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[303,358,658],"tags":[926,927],"class_list":["post-1558","post","type-post","status-publish","format-standard","hentry","category-database","category-how-to","category-sql-server-2","tag-ssrs","tag-ssrs-used-reports"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1558"}],"version-history":[{"count":1,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1558\/revisions"}],"predecessor-version":[{"id":1559,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1558\/revisions\/1559"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}