Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Can you have a report mail based on when a field in a table is updated? Expand / Collapse
Author
Message
Posted Wednesday, October 2, 2013 1:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, May 23, 2014 7:11 PM
Points: 2, Visits: 6
I send out a report with a subscription. But I set it up to mail out at 8:00 am daily and I would like it to mail out when the data has been updated ... sometimes at 6:00 am sometimes at 6:30 am etc.
Is that possible?
Post #1500892
Posted Wednesday, October 2, 2013 1:39 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Sunday, July 20, 2014 11:20 PM
Points: 13,252, Visits: 10,133
You might want to check out data alerts:

Data Alerts (SSRS)

If you control the process that updates the data, you might schedule the reports at the end of the process.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1500901
Posted Thursday, October 3, 2013 10:13 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, December 16, 2013 10:42 AM
Points: 96, Visits: 434
I've set up something similar in the past. I set up a subscription which I only wanted to fire if something failed. The way I accomplished this is to create a standard subscription then go into the job and alter the SQL statement from:

exec ReportServer.dbo.AddEvent @EventType='TimedSubscription', @EventData='829468de-eb84-4930-b9be-7b4f3b00165e'

To:

DECLARE @FieldToCheck = (SELECT FieldToCheck FROM dbo.Fields)
IF @FieldToCheck > 5 --JA: if we have sent more than 5 more orders than received back, fire off error report
exec ReportServer.dbo.AddEvent @EventType='TimedSubscription', @EventData='829468de-eb84-4930-b9be-7b4f3b00165e'


It worked like a charm.

You could use something like this, although you would need more infrastructure to get it to work because you need to capture the field at the time of change so you could test against the 'current' value.


EDIT -----------------------------------

After checking out data alerts from above, you should definitely try that first before resorting to a hack like what I've suggested. =D


-------------------------------------------------------------------------------------------------
My SQL Server Blog
Post #1501272
Posted Thursday, October 3, 2013 4:26 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, May 23, 2014 7:11 PM
Points: 2, Visits: 6
Thanks so much I'll play with this.
Post #1501376
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse