简体   繁体   中英

SSRS email subscription sending the old version of the report

I have a ssrs report with email subscription which excel attachment every morning to a list of email addresses. The report is sending 2 emails everyday now after i updated the report and redeployed it to the report server. I have tried deleting the subscription and creating new one, deleting the report and redeploying with the new report name but neither of these is helpful. The report caching property is set to use the recent data. checked at the report server catalog where there is only the new version of the report. Any idea why it's sending email attachment with old version of the report although the there is no subscription available. I am using VS 2013

Navigate to the report in the SSRS folder, click the drop down and choose manage. Then go to processing options and choose: Always run this report with the most recent data. And also choose do not cache temporary copies of this report.

I'm thinking there is a copy of the report somewhere.. possibly hidden that is sending out the subscription.

Run the following against your report server

SELECT
sj.[name] AS [Job Name],
rs.SubscriptionID,
c.[Name] AS [Report Name],
c.[Path],
su.Description


FROM msdb..sysjobs AS sj 

INNER JOIN ReportServer..ReportSchedule AS rs
ON sj.[name] = CAST(rs.ScheduleID AS NVARCHAR(128)) 

INNER JOIN ReportServer..Subscriptions AS su
ON rs.SubscriptionID = su.SubscriptionID

INNER JOIN ReportServer..[Catalog] c
ON su.Report_OID = c.ItemID

where c.[Name]  like '%your report name here%'

you should get all associated subscriptions for the report.

user the job name and plug that into the following code and execute it and see what arrives. You may find there is a hidden report that is running the subscription. I've had that happen to me before!

USE [msdb]
EXEC sp_start_job @job_name = '05FC75D8-9F73-424E-A078-1F78A6AC3262'
 --enter the job name from the above query into this query to run the job :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM