phires / reportsync

Fork of ReportSync Tool to sync SSRS reports between to servers
MIT License
32 stars 23 forks source link

Subscriptions not transferred over #10

Open Lanshenberger opened 4 years ago

Lanshenberger commented 4 years ago

The problem I was having related to transferring subscriptions. When I sync a report to another server, the subscription is not transferred over. The documentation for ReportingService2005.ListSubscriptions states that "If valid values are supplied for both the Owner parameter and Report parameter, the method returns all subscriptions for the specified report that the specified user created and has permission to view." This becomes an issue when you want to transfer all subscriptions that the user can see. However, the documentation also states that "If only the Report parameter is submitted, the method returns all subscriptions for all users of the specified report that the current user has permission to view."

So, to fix this, I changed (in ReportSync.cs): var subscriptions = _sourceServicesMgmt.ReportingService.ListSubscriptions(itemPath, tbSourceUser.Text); to var subscriptions = _sourceServicesMgmt.ReportingService.ListSubscriptions(itemPath, null);