How to get Last Run of the Reports in Dynamics 365 On-Premise


Navigate to the CRM Organization Database – Right Click – Select “New Query”

Paste the following Query and replace the “ORG_MSCRM” with your Organization Database and “ReportServer_MSCRM” with your Report Server Database. Execute the Query.

with ReportNames as (

select rn.name, ‘{‘ + cast(rn.reportid as nvarchar(40)) + ‘}’ as reportid

from ORG_MSCRM..FilteredReport rn

)

SELECT

rn.Name as ‘Report Name’,

count(*) as ‘Report Run Count’,

MIN(e.TimeStart) as ‘First Run Time’,

max(E.TimeEnd) as ‘Last Run Time’

FROM ReportServer_MSCRM.dbo.Catalog Ca with(nolock)

left outer join ReportNames rn on Ca.Name = rn.ReportID

LEFT OUTER JOIN ReportServer_MSCRM.dbo.ExecutionLog  E with(nolock) ON Ca.ItemID = E.ReportID

WHERE Ca.type=2

and rn.Name is not null

group by rn.Name

order by ‘Report Run Count’ desc

 

 

http://www.sidesofmarch.com/index.php/archive/2015/04/06/which-ssrs-reports-are-being-run-through-dynamics-crm/

Advertisements

About Kishore Dhanekula

MS Dynamics CRM and .NET Architect
This entry was posted in CRM, Dynamics 365, Ms Dynamics CRM 2013, MS Dynamics CRM 2015, MS Dynamics CRM 2016 and tagged , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s