SSRS: Driven to the Brink with the Data Driven Subscriptions Error

Clam Chowder….but first, you attempt to create a Data Driven subscription.  You have setup your SMTP settings for your Reporting Services instance, you have setup your encryption key for storing sensitive data and you have configured stored credentials for all data sources used in the report.

Alas you get the following error when creating your Data Driven subscription.

DataDriven

If you have checked all of the above and you think you might be going crazy, then it is likely you have made a reference to the User!UserID Report Collection within your report somewhere.  You will need to get rid of it, or use a workaround that I stumbled across http://prologika.com/CS/blogs/blog/archive/2011/03/28/data-driven-subscriptions-and-row-level-security.aspx (read through this link a little because it has more detail than my blog) but the example below simplifies the expression a little.

Use the following code snippet in any expression where you need to see the User running the report.


=Code.ClamChowder()

And make sure you have the following function set out in the Code section of your Report.


Public Function ClamChowder() as String

return Report.User!UserID.ToLower()

End Function

You gotta love Clam Chowder with sour dough.