SSRS How to create a Data-driven subscription?

Andrey Kucherovsky 96 Reputation points
2021-03-17T19:53:18.403+00:00

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
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,869 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andrey Kucherovsky 96 Reputation points
    2021-03-19T07:48:02.737+00:00

    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.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,571 Reputation points
    2021-03-18T01:55:35.333+00:00

    Hi @Andrey Kucherovsky ,
    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.

    0 comments No comments

  2. Andrey Kucherovsky 96 Reputation points
    2021-03-18T11:14:21.557+00:00

    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.

    0 comments No comments