简体   繁体   中英

SSRS data driven subscription

I have created a data driven subscription for an SSRS report where I have written the dataset query to fetch the report parameters. Now, whatever email id I provide gets all the reports generated by passing different parameters. Here, I want to achieve is sending the report generated by a particular parameter to a particular email id. For all the different parameters, the reports generated should be delivered to different email ids. Please help me if this is achievable in SSRS and how to achieve this? Your help will be very much appreciated. Thank you!

When you create your subscription, check the "data driven subscription" radio box. This will display a "Dataset" heading with "Edit Dataset" button. Press that button and an empty text box will open. Paste your query in here and press validate. If the query validates, press apply. If it doesn't, it means there is an error in the query.

Now in your dataset you will see your fields. Sometimes these will be formatted with xml. Go down to your delivery and in the email field you can select "Get value from dataset". Next to it pick the email field from your query. (If you have the xml field this might be hard to decipher... if you have dual screens put it on the left screen and mouse over for the full value)

For your parameters you can do the same theing with the "Get value from dataset" option.

That's subscriptions via dataset in a nutshell.

I did a workaround and got the solution. I created a new table having two columns, one column with all the parameters and the next column with the corresponding email id. In the dataset query I wrote the select statement by inner joining the two tables. So, this way I achieved the required dataset and using that got me the required data driven subscription. Thanks everyone for your replies.

As a standard variant of Mrityunjay Kumar's answer you may press EditDataSet on SubscriptionPage and may select field#1 as the input parameter of the report and may select field#2 as the email to send. After that you may choose field#1 in DeliveryOption and field#2 in ReportParameter on the same SubscriptionPage. So sending reports will be depends on email in field#1 and parameter in field#2.

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