[英]Data Driven SSRS Subscription without SQL Server 2008 R2
I am trying to mimic the functionality of a data driven subscription. 我试图模仿数据驱动订阅的功能。 We are current running a version of report server that does not allow for Data Driven Subscripts.
当前,我们正在运行不允许数据驱动下标的报表服务器版本。 Current this is what I am working with
目前这就是我正在使用的
use ReportServer
declare @datetime varchar(29)
set @datetime = convert(varchar(16),dateadd(MINUTE,2,GETDATE()), 126) + ':00.000-05:00'
update Subscriptions
set MatchData = '<ScheduleDefinition xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><StartDateTime xmlns="http://schemas.microsoft.com/sqlserver/2006/03/15/reporting/reportingservices">' + @datetime + '</StartDateTime></ScheduleDefinition>',
modifieddate = convert(varchar(23),GETDATE(), 121)
where SubscriptionID = '48FB6FE9-969B-4E8D-AD37-E80CE20FDDE5'
update Schedule
set StartDate = CONVERT(VARCHAR(16), dateadd(minute, 2, GETDATE()), 121) + ':00.000',
NextRunTime = null
where Name = '3664a678-af17-4a05-9ff4-5666ea727e91'
It updates the report server however when the time comes it does not execute. 它会更新报表服务器,但是到了时间就不会执行。 Does anyone know how I can trigger this?
有谁知道我该如何触发?
I was short on time when I left my comment, but I just took the time to find a good explanation. 当我发表评论时,我的时间很短,但是我只是花时间找到了一个很好的解释。 From an MSDN blog :
从MSDN博客 :
When you create a subscription several things are added to the RS server:
创建订阅时,将向RS服务器添加一些内容:
A row is placed in the Subscriptions table identifying the name of the report, along with parameter settings, data driven query info and so on to process the subscription
在“订阅”表中放置一行,用于标识报告的名称,参数设置,数据驱动的查询信息等,以处理订阅
A row is placed in the Schedule and ReportSchedule tables with the timing of the subscription
预订时间在Schedule和ReportSchedule表中放置一行
A SQL Server Agent job is created to control the scheduled execution of the report, and this is stored in the sysjobs and sysjobsteps of the MSDB database.
创建一个SQL Server代理作业来控制报表的计划执行,并将其存储在MSDB数据库的sysjobs和sysjobsteps中。 The agent job name is a guid value that represents the ScheduleId (yes, in case you've not yet noticed, this makes your Agent Job list messy with a bunch of guids that make it hard to work with your non-subscription jobs, we are hearing you:).
座席工作名称是一个表示ScheduleId的guid值(是的,如果您尚未注意到,这会使您的座席工作列表杂乱无章,而一堆Guid会使您难以处理非订阅工作,正在听到您的声音:)。
It looks like you are making entries to two of the three needed tables, and you still need to create a SQL Agent job. 看起来您正在向三个所需表中的两个进行输入,并且仍然需要创建SQL Agent作业。
As the author points out, these aren't supported for direct manipulation, so test heavily, and don't expect much support if things break. 正如作者所指出的那样,直接操作不支持这些功能,因此请进行大量测试,并且万一发生问题,不要指望有太多支持。
Alternatively you could create these subscriptions dynamically coding against the SSRS Web Services, such as the Subscription and Delivery methods 或者,您可以根据SSRS Web服务动态创建这些订阅,例如Subscription和Delivery方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.