I show a list of items with a field Assigned to, which are email addresses. Right now I have set up a subscription with distinct list of assigned to email addresses and sent
Sounds like you need to set up a data driven subscription which is available with the enterprise edition of SSRS 2012.
Create the report with a User parameter that will create your list of items attached to an email addresses.
When you then create the data driven subscription you get the opportunity to create another SQL statement that can be used for addressees and to get values to pass as parameters to your report.
If your proc is created something like (yours will probably be a little more complex...)
CREATE PROC GetAssigned
@EmailAddress nvarchar(255)
As
IF @EmailAddress is Not null
SELECT EmailAddress,Item1,Item2
FROM MyTable
WHERE EmailAddress = @EmailAddress
ELSE
SELECT DISTINCT EmailAddress FROM myTable
You can run this proc in both the report and as the data driven subscription to get the list of email addresses to send and as the parameter to the report. (Although you could just add the SELECT DISTINCT
query to the box below rather than having it in the proc?)
To set up the Subscription (Enterprise version, right?)
Although, you could just enter the script in the box above.
SELECT DISTINCT EmailAddress from MyTable