[Forum FAQ] How do I send an email to users when the data in the report have been changed in Reporting Services?

Introduction
There is a scenario that the data in the report changes infrequently, so the users want to be informed and get the most updated data once the data changes. By default, report server always run the report with the most recent data. Is there a way that we
can subscribe the report, so that we can send an email to users when the data in the report has been changed?
Solution
To achieve this requirement, we can create a subscription for the report, then create a trigger in the table which including the report data. When this table has data insert, update or delete, it will be triggered and execute the subscription to send email
to users.
In the Report Manager, create a subscription for the report and make it only execute one time.
When we create a subscription, a corresponding SQL Agent job will be created. Then we can use the query below to find out the job based on ScheduleId:
-- List all SSRS subscriptions
USE [ReportServer];  -- You may change the database name.
GO 
SELECT USR.UserName AS SubscriptionOwner
      ,SUB.ModifiedDate
      ,SUB.[Description]
      ,SUB.EventType
      ,SUB.DeliveryExtension
      ,SUB.LastStatus
      ,SUB.LastRunTime
      ,SCH.NextRunTime
      ,SCH.Name AS ScheduleName   
          ,RS.ScheduleId
      ,CAT.[Path] AS ReportPath
      ,CAT.[Description] AS ReportDescription
FROM dbo.Subscriptions AS SUB
     INNER JOIN dbo.Users AS USR
         ON SUB.OwnerID = USR.UserID
     INNER JOIN dbo.[Catalog] AS CAT
         ON SUB.Report_OID = CAT.ItemID
     INNER JOIN dbo.ReportSchedule AS RS
         ON SUB.Report_OID = RS.ReportID
            AND SUB.SubscriptionID = RS.SubscriptionID
     INNER JOIN dbo.Schedule AS SCH
         ON RS.ScheduleID = SCH.ScheduleID
ORDER BY USR.UserName
         ,SUB.ModifiedDate ;
Create a trigger in the table which including the report data.
CREATE TRIGGER reminder
ON test.dbo.users
AFTER INSERT, UPDATE, DELETE
AS
exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
Please note that the command ‘exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'’ is coming from the job properties. We can go to SQL Server Agent Jobs, right-click the corresponding job to open
the Steps, copy the step command, and then paste it to the query.
Then when the user table has data insert, update or delete, the trigger will be triggered and execute the subscription to send email to users.
References:
Subscriptions and Delivery (Reporting Services)
Internal Working of SSRS Subscriptions
SQL Server Agent
Applies to:
Reporting Services 2005
Reporting Services 2008
Reporting Services 2008 R2
Reporting Services 2012
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

Thanks,
Is this a supported scenario, or does it use unsupported features?
For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
in a supported way?
Thanks! Josh

Similar Messages

  • HT1688 How do I send an email from my Iphone to a "group" that I have established in my Yahoo account

    How do I send an email from my Iphone to a "group" that I have established in my Yahoo account?

    So I have bought a couple of apps on my iphone and would like to transfer them to my itunes library, but not sure how.
    iTunes > File > Transfer purchases
    When I plug in my iphone and try and sync the two, I get a warning from itunes that everything on my iphone will be wiped and everything from my itunes library will be moved to it.
    Have you changed the computer you are syncing with?

  • How do I turn off Headphones?  My phone rings but all other alerts have been changed to headphones, so no sound. (tried sounds, settings, manual side buttons)

    How do I turn off Headphones?  My phone rings but all other alerts have been changed to headphones, so no sound. (tried sounds, settings, manual side buttons)

    As was already said: the camera's interpretation of the raw data is just one interpretation, and not the same as Adobe's. Don't confuse it with "exactly how they were shot", as this doesn't apply when shooting Raw. Granted it IS the manufacturer's interpretation, but you wouldn't be shooting Raw and using Adobe Camera Raw if you thought the manufacturer was always right.
    One thing nobody has mentioned is Adobe's "baseline exposure" compensation factor. Camera Raw adjusts the default preview exposure by a factor of EV based on their measurements of the camera sensor. My present camera is boosted by 0.35EV and my last camera by 0.5EV. There is a way of determining this using EXIFTOOL, but I can't remember how to do it offhand. For the last few years, I have adjusted my own Camera Raw defaults by reversing this compensation, so it more closely matches the exposure I was expecting.
    EDIT: here's the procedure, if you're interested. Re: Baseline Exposure

  • [Forum FAQ] How do I send multiple rows returned by Execute SQL Task as Email content in SQL Server Integration Services?

    Question:
    There is a scenario that users want to send multiple rows returned by Execute SQL Task as Email content to send to someone. With Execute SQL Task, the Full result set is used when the query returns multiple rows, it must map to a variable of the Object data
    type, then the return result is a rowset object, so we cannot directly send the result variable as Email content. Is there a way that we can extract the table row values that are stored in the Object variable as Email content to send to someone?
    Answer:
    To achieve this requirement, we can use a Foreach Loop container to extract the table row values that are stored in the Object variable into package variables, then use a Script Task to write the data stored in packages variables to a variable, and then set
    the variable as MessageSource in the Send Mail Task. 
    Add four variables in the package as below:
    Double-click the Execute SQL Task to open the Execute SQL Task Editor, then change the ResultSet property to “Full result set”. Assuming that the SQL Statement like below:
    SELECT   Category, CntRecords
    FROM         [table_name]
    In the Result Set pane, add a result like below (please note that we must use 0 as the result set name when the result set type is Full result set):
    Drag a Foreach Loop Container connects to the Execute SQL Task. 
    Double-click the Foreach Loop Container to open the Foreach Loop Editor, in the Collection tab, change the Enumerator to Foreach ADO Enumerator, then select User:result as ADO object source variable.
    Click the Variable Mappings pane, add two Variables as below:
    Drag a Script Task within the Foreach Loop Container.
    The C# code that can be used only in SSIS 2008 and above in Script Task as below:
    public void Main()
       // TODO: Add your code here
                Variables varCollection = null;
                string message = string.Empty;
                Dts.VariableDispenser.LockForWrite("User::Message");
                Dts.VariableDispenser.LockForWrite("User::Category");
                Dts.VariableDispenser.LockForWrite("User::CntRecords");     
                Dts.VariableDispenser.GetVariables(ref varCollection);
                //Format the query result with tab delimiters
                message = string.Format("{0}\t{1}\n",
                                            varCollection["User::Category"].Value,
                                            varCollection["User::CntRecords"].Value
               varCollection["User::Message"].Value = varCollection["User::Message"].Value + message;   
               Dts.TaskResult = (int)ScriptResults.Success;
    The VB code that can be used only in SSIS 2005 and above in Script Task as below, please note that in SSIS 2005, we should
    change PrecompileScriptIntoBinaryCode property to False and Run64BitRuntime property to False
    Public Sub Main()
            ' Add your code here
            Dim varCollection As Variables = Nothing
            Dim message As String = String.Empty
            Dts.VariableDispenser.LockForWrite("User::Message")
            Dts.VariableDispenser.LockForWrite("User::Category")
            Dts.VariableDispenser.LockForWrite("User::CntRecords")
            Dts.VariableDispenser.GetVariables(varCollection)
            'Format the query result with tab delimiters
            message = String.Format("{0}" & vbTab & "{1}" & vbLf, varCollection("User::Category").Value, varCollection("User::CntRecords").Value)
            varCollection("User::Message").Value = DirectCast(varCollection("User::Message").Value,String) + message
            Dts.TaskResult = ScriptResults.Success
    End Sub
    Drag Send Mail Task to Control Flow pane and connect it to Foreach Loop Container.
    Double-click the Send Mail Task to specify the appropriate settings, then in the Expressions tab, use the Message variable as the MessageSource Property as below:
    The final design surface like below:
    References:
    Result Sets in the Execute SQL Task
    Applies to:
    Integration Services 2005
    Integration Services 2008
    Integration Services 2008 R2
    Integration Services 2012
    Integration Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • On my mac how do I send an attachement from Firefox to a 3rd party? I have been unable to locat the proper icon.

    trying to send from firefox an attachment to a 3rd party and unable to locate the proper icon.

    Firefox doesn't have a built-in emailer, so I'm guessing you are using your provider's webmail site. Each site has different buttons for adding attachments. Do you want to indicate which one you're using to see whether anyone can provide specific comments?
    Also, your browser reported to the forum that you are running Forefox 3.6.13, which is a very old version with numerous publicly disclosed security vulnerabilities. Is that version number correct? (You can compare Help > About Firefox)

  • How do you send an email to a specific person based on if a particular check box is checked?

    How do you send an email to a specific person based on if a particular check box is checked?

    Try the LiveCycle Designer forum.

  • How can I send video email

    I see a lot of sites offering video email. Does .mac offer video email? If so, how do I send video email.

    You can attach a QuickTime or other video file to a mail message, though these tend to get clipped off and stripped off at mail servers — even compressed video files tend to be huge. The recipient gets to buffer the file in local storage, and can also have issues downloading the file on slower links.
    You can send HTML-format mail and link to a video file on a server. (I tend to avoid loading HTML files from remote sites for various reasons, and I'm not alone here.) This is probably what these "video email services" are providing: storage, and a way to link to it from within an HTML-format mail message.
    Or you could look to iChat or other such interactive mechanisms. iChat is part of Mac OS X and iChat Server is part of Mac OS X Server.
    As for .Mac and such, a specific [.Mac Discussion Forum|http://discussions.apple.com/category.jspa?categoryID=116] is available, as is the [Apple Mail client forum|http://discussions.apple.com/forum.jspa?forumID=753].

  • How can I send an email to a group from my iPhone?

    I want to send an email to a group in my contacts, but when I select the group, the individuals display for selection.  How can I send an email by addressing it to the group? 

    I recently upgraded my wife's computer to mountain lion so we could sync it with her iPhone, allowing her to send emails to the groups she manages whether she's at home or on the road.
    Is it really the case that the iPhone is incapable of this?  The mac does it fine and the iPhone goes through the motions but then bails when you hit send, saying it isn't a valid address.
    This really makes no sense.  Isn't this the whole point of iCloud?

  • How can I send an email from my iPad3 to all of my contacts at once?

    I would like to know how I can send an email message from my iPad 3 to all of my contacts at once.

    If you have a Mac, and you have your contacts synced to your Mac (perhaps with iCloud), you could create a contact group on your Mac containing all your contacts and have that group synced to your iPad.
    Perhaps you can do something like that, depending on whether you keep your contacts somewhere else and what type of computer you have.

  • How can I send an email from Sharepoint Online using sandbox solution?

    How can I send an email from Sharepoint Online using sandbox solution?
    If possible I do not want to use workflow.
    Is It possible to do it without using workflow?

    hello Steven Andrews,
    when any user sends a message using contact us page in SharePoint online.
    1. We are inserting item in Contact Us List . - This is working fine
    for anonymous users also. We have used Office365 anonymous codeplex wsp and it is working fine. Anonymous user is able to insert new record in the Contact Us List.
    2. Once, new record is inserted in Contact Us list, we want to fire email notifying thanks to the user on his email id as well as to our company x person for notification of new inquiry. 
    We tried using Workflow having impersonation step for  anonymous user but it is not working for Anonymous users. Workflow is able to sent the email if someone logged into system but not working for Anonymous user although workflow is getting started
    but not able to send email although used Imperonsation step.
    We are stuck into implementing second step.

  • HOW DO I SEND AN EMAIL ON MY IPHONE OR IPAD AND MAKE IT APPEAR ON THE MAIL APPLICATION ON MY MAC?   IT ONLY WORK THE OTHER WAY ---SENDING AN EMAIL ON MY COMPUTER ---APPEARS IN SENT ITEMS ON MY IPHONE AND IPAD.

    HOW DO I SEND AN EMAIL ON MY IPHONE OR IPAD AND MAKE IT APPEAR ON THE MAIL APPLICATION ON MY MAC?   IT ONLY WORK THE OTHER WAY ---SENDING AN EMAIL ON MY COMPUTER ---APPEARS IN SENT ITEMS ON MY IPHONE AND IPAD.

    IT IS FOR GMAIL.

  • How can I send an email to a group in my address book, but hide the individual names and email addresses?

    how can I send an email to a group in my address book, but hide the individual names and email addresses?

    You used to be able to do this through leaving unchecked the box in preferences "when sending to a group show all member addresses". However, that feature failed some time ago (two or three years?) and the only way to hide the addresses now is to put the group in the BCC field.

  • How can you send an email out to more than 65 persons at a time?

    I have an email notification list of 175 persons who regularly get communications from me. I have recently discovered that only 65 of them are getting these emails. How can I send to my entire list?
    Thanks!

    Is the list stored on a server or in Thunderbird?
    I'm not aware of a limit to the number of recipients of a message in Thunderbird when you use a list. A limit may be imposed by your service provider as an anti-spam measure. You may want to search around to learn more about any limits there.

  • How do I send an email with a "read receipt" please

    how do I send an email with a "read receipt" please

    banyard,
    There is no support for read receipts in Apple mail.
    Sorry,
    Captfred

  • How do I send an email with a group address and not show the addresses/names of the recipients?

    How do I send an email with a group address and not show the addresses/names of the recipients?

    Use BCC.   That's blind carbon copy.   And copy paste the address into the BCC field.  It really depends what e-mail program you use how to enable BCC.

Maybe you are looking for

  • Exception in XML bursting

    Hi, I am using bursting control file to split the output of the invoice report based on the trax number. Below is my control file <!-- $Header: XXBS_AR007_PRT_INV_BURSTING_CONTROL.xml 2011/09/30 10:23:23 xdouser noship $ --> <!-- dbdrv: none --> <xap

  • Changing standard size of interactive image?

    Hi, when I drag in an interactive image widget, is it possible to change the size of the widget itselve? Not the image that rests inside, but the widget. When the image is smaller than the widget, there is wasted space on the top and the at bottom, a

  • Slideshows in iMovie '08

    I am working on my first slideshow in iMovie '08. I have done numerous shows in '06. I am trying to rearrange some of the photos, but can not figure out how. I have tried to drag and drop...no luck. I have not added transitions yet. I was also lookin

  • Oracle XE limitations

    Excuse the newbie question. I know that Oracle XE has a limit of 4g on the size of a DB. Can you have multiple DBs? We currently support our small customers on JET. They have large projects with seismic data. It can add up to bigger than 4G quickly i

  • Finding and replacing (international??) characters

    I'm having trouble finding and replacing characters. Can anyone help me see the wood for the trees? The characters in question are single quote characters (I asume) which have been entered in a windows box/word program/filemaker progremme or some oth