How can I add the server name to the subject line of a SSIS subscription email?

  • How can I add the server name to the subject line of a SSIS subscription email?

    In Microsoft SQL Server Integration Services (SSIS) RDL report files uploaded are often set with the ability to send out periodic email alerts. On the SSIS 2008 system, this is called "Subscriptions". When a new email alert is set up, there are system defined strings in the Subject line which is presented as default as:
    @ReportName was executed at @ExecutionTime

    How can I add a new item to this subject line for the server name?

  • Are you sure you're talking about SSIS (SQL Server Integration Services) here? This sounds more like you're talking about SSRS (SQL Server Reporting Services) considering you mention "reports" and Subscriptions (and that when you create a email subscription in SSRS the default subject is "@ReportName was executed at @ExecutionTime")

    In terms of those parameters though, those are the only 2, but considering that SSRS runs on a single instance anyway, why not just change the subject to "@ReportName was executed at @ExecutionTime on {Server Name}" (obviously replace {Server Name} your your server's name)?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thom A - Friday, January 25, 2019 6:39 AM

    Are you sure you're talking about SSIS (SQL Server Integration Services) here? This sounds more like you're talking about SSRS (SQL Server Reporting Services) considering you mention "reports" and Subscriptions (and that when you create a email subscription in SSRS the default subject is "@ReportName was executed at @ExecutionTime")

    In terms of those parameters though, those are the only 2, but considering that SSRS runs on a single instance anyway, why not just change the subject to "@ReportName was executed at @ExecutionTime on {Server Name}" (obviously replace {Server Name} your your server's name)?

    Do you mean that  I am limited to just two parameters?  I found this web site https://docs.microsoft.com/en-us/sql/reporting-services/report-design/built-in-collections-built-in-globals-and-users-references-report-builder?view=sql-server-2017 that seems to suggest I can have different parameters.  I guess I am just limited to just two of them.  And, yes, it is SSRS.

  • if you have the enterprise version, Data Driven subscriptions are an option.
    with data driven subscription, you might have a view that has all the info on a per row basis, so every row can have a individualized subject and email address if needed.
    this is especially nice if each person gets an individualized report (ie bill gets Region1, Scott gets Region2, etc)
    all you need to do is construct a table/view that has the  values needed for the report.

    note the dropdown has an either or the default, or from a column in the query from theh previous step:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • wm.m.thompson - Friday, January 25, 2019 2:32 PM

    Do you mean that  I am limited to just two parameters?  I found this web site https://docs.microsoft.com/en-us/sql/reporting-services/report-design/built-in-collections-built-in-globals-and-users-references-report-builder?view=sql-server-2017 that seems to suggest I can have different parameters.  I guess I am just limited to just two of them.  And, yes, it is SSRS.

    Those aren't the same. Those are variables that are determined within the rdl, not the subscription. You see those in the Expression building Screen:

    They aren't the same as the variables you can see when creating the subscription. There you only have the 2 already mentioned.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thank you for the very helpful responses!!

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply