了解 ReportServer.dbo.Schedule 表
您好,我正在尝试制作一份报告,其中列出了我们的报告服务器上的所有订阅、它们所在的报告、它们运行的时间和日期以及重复率。到目前为止,我已经能够获得报告清单和报告时间表。我似乎无法理解 Schedule 表中的值和列的含义。
如果有人能够阐明如何理解这些专栏及其价值,我将非常感激。这是我到目前为止的疑问。
使用报表服务器;
转到
选择用户.用户名
, c.Name AS 报告
, 订阅.说明
,时间表。*
/* , Schedule.RecurrenceType
, Schedule.MinutesInterval
, Schedule.DaysInterval
, Schedule.WeeksInterval
, Schedule.DaysOfWeek
, Schedule.DaysOfMonth
,时间表。[月]
, Schedule.MonthlyWeek */
FROM [目录] AS c
INNER JOIN 订阅
ON c.ItemId = Subscriptions.Report_OId
内连接用户
ON Subscriptions.OwnerId = Users.UserId
INNER JOIN 报告计划
ON Subscriptions.SubScriptionId = ReportSchedule.SubScriptionId
内连接时间表
ON ReportSchedule.ScheduleId = Schedule.ScheduleId
谢谢,
克里斯
Hi I am trying to make a report that lists all the subscriptions on our report server, the report they are on, the times and days they are run on, and the reccurence. So far I have been able to get a list of the reports and schedules of the reports. I cannot seem to understand what the values and columns in the Schedule table mean.
If anyone could shed some light on how to make sense of these columns and their values, I would really appreciate it. This is the query I have so far.
USE ReportServer;
GO
SELECT Users.UserName
, c.Name AS Report
, Subscriptions.Description
, Schedule.*
/* , Schedule.RecurrenceType
, Schedule.MinutesInterval
, Schedule.DaysInterval
, Schedule.WeeksInterval
, Schedule.DaysOfWeek
, Schedule.DaysOfMonth
, Schedule.[Month]
, Schedule.MonthlyWeek */
FROM [Catalog] AS c
INNER JOIN Subscriptions
ON c.ItemId = Subscriptions.Report_OId
INNER JOIN Users
ON Subscriptions.OwnerId = Users.UserId
INNER JOIN ReportSchedule
ON Subscriptions.SubScriptionId = ReportSchedule.SubScriptionId
INNER JOIN Schedule
ON ReportSchedule.ScheduleId = Schedule.ScheduleId
Thanks,
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是部分答案...
DaysOfWeek 与二进制设置相关,其中:
星期日是位 0:值为 1
星期一是位 1:值 2
星期二是位 2:值 4
星期三是位 3:值为 8
星期四是位 4:值为 16
星期五是位 5:值为 32
星期六是位 6:值为 64
因此,如果报表每周一和周三运行,则 DaysOfWeek 将是 2 + 8,或 10。
我目前正在自己处理此问题,因此当我发现更多信息时,我将对此进行添加。
Here is a partial answer...
DaysOfWeek relate to the binary setting where:
Sunday is bit 0: Value of 1
Monday is bit 1: Value of 2
Tuesday is bit 2: Value of 4
Wednesday is bit 3: Value of 8
Thursday is bit 4: Value of 16
Friday is bit 5: Value of 32
Saturday is bit 6: Value of 64
So if the report is run every Monday and Wednesday, the DaysOfWeek will be 2 + 8, or 10.
I am currently working on this myself so I will add to this as I discover more.
我对此有一个解决方案,因为它出现在我正在撰写的报告中。
I have a solution for this as it came up for a report I am writing.