question

AndreyKucherovsky-9345 avatar image
0 Votes"
AndreyKucherovsky-9345 asked AndreyKucherovsky-9345 answered

SSRS How to create a Data-driven subscription?

Hello everybody!


First time trying to create data-driven subscription in the SSRS but got the error "Data-driven subscription cannot be created because the report or shared dataset has user profile dependencies and cannot be run unattended. "

SSRS report works with data from WSS_Content database of the Project Server (not in SharePoint mode), so users have only one parameter there labeled as ResourceName with Value Field ResourceUID.

DataSource connected with domain account. This account also used as Execution Account and File Share Account for subscriptions.

Can somebody tell me what's wrong and how resolve it?

sql-server-reporting-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndreyKucherovsky-9345 avatar image
0 Votes"
AndreyKucherovsky-9345 answered

Hello everybody!


So, finally it were done!

But sending report finished with unknown error.

After checking the SSRS's logs I found that SSRS trying to connect SMTP server without SSL, but server configured with SSL required.
Making UseSSL to False was helpful to resolve sending trouble.

So, following my previous message I got understanding how to create data-driven subscriptions.
It seems that question answered.
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Joyzhao-MSFT avatar image
0 Votes"
Joyzhao-MSFT answered Joyzhao-MSFT edited

Hi @AndreyKucherovsky-9345 ,
If you use the User!UserID to filter the data at runtime, the system tries to evaluate the User during Cache Load.

SSRS data driven subscription do not work if we have user-id as parameter.

If we deleted the user-id parameter and Viola! the data driven subscription started working.

You will need a “method” to get rid of the UserID.

 Public Function UserName()
 Try
 Return Report.User!UserID
 Catch
 Return "System"
 End Try
 End Function

You must use stored credentials if you want to use a scheduled report:
Stored credentials are required if you want to support subscriptions, or schedule report history generation or report snapshot refreshes.
Please refer to: http://msdn2.microsoft.com/en-us/library/ms160330.aspx

Best Regards,
Joy


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndreyKucherovsky-9345 avatar image
0 Votes"
AndreyKucherovsky-9345 answered

Hello Joy!


Thank you for the answer.
Well, it seems that I have a little success here.

So, the script in the report contains
WHERE ResourceUID IN (@ResourceUIDParameter)

where this parameter get available values from the query.

As soon as I changed the value of this parameter in the report to "None", it allowed me to select Data-Driven type of Subscription in the Report Subscriptions.
Then I put the query of available values into Subscription query like this:
To - ResourceemailAddress
ResourceUIDParamter - ResourceUID

But sending report finished with unknown error.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.