AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.01.2018, 18:14   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
Afna CRM: Get CRM Reports statistics
Источник: http://a-crm.blogspot.com/2018/01/ge...tatistics.html
==============

If you want to see how may times a certain report has been executed, run this query on the ReportServer database. First replace the [CRM DATABASE NAME_MSCRM] with the correct CRM database name. If the database is not on the same server, then you can't simply joint the tables in one query, but still you can get the report Id list from the Reps (Name column).

;WITH Reps AS
(
SELECT c.Name,
c.[Path],
COUNT(*) AS TimesRun,
MAX(l.TimeStart) AS [LastRun]
FROM [ReportServer].[dbo].[ExecutionLog](NOLOCK) AS l
INNER JOIN [ReportServer].[dbo].[Catalog](NOLOCK) AS c ON l.ReportID = C.ItemID
WHERE c.Type = 2 -- Only show reports 1=folder, 2=Report, 3=Resource, 4=Linked Report, 5=Data Source
GROUP BY l.ReportId,
c.Name,
c.[Path]
)
SELECT CRM.Name, CRM.ReportId, Reps.TimesRun, Reps.LastRun, Reps.Path FROM Reps JOIN [CRM DATABASE NAME_MSCRM]..Report CRM ON Reps.Name = '{' + CAST(CRM.reportid AS CHAR(36)) + '}'


Be aware that the statistic is there for a limited time. Execute this to get the minimum date: SELECT MIN(ExecutionLog.TimeStart) FROM [ReportServer].[dbo].ExecutionLog

Источник: http://a-crm.blogspot.com/2018/01/ge...tatistics.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Microsoft Dynamics CRM Team Blog: Personalizing Reports for Microsoft Dynamics CRM Online Blog bot Dynamics CRM: Blogs 0 21.12.2011 08:11
crminthefield: CRM 2011 Error “Scheduling reports on behalf of other users is prohibitted” when scheduling reports Blog bot Dynamics CRM: Blogs 0 21.12.2011 01:16
Microsoft Dynamics CRM Team Blog: Update Rollup 5 for Microsoft Dynamics CRM 2011 Blog bot Dynamics CRM: Blogs 2 27.10.2011 17:11
Rahul Sharma: Microsoft Dynamics CRM 2011 Fetch XML based Custom Reports Blog bot Dynamics CRM: Blogs 0 15.04.2011 00:12
Все о Microsoft Dynamics CRM: Как установить Microsoft Dynamics CRM 2011 Beta Blog bot Dynamics CRM: Blogs 0 31.10.2010 15:08
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 19:50.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.