How to Implement Subscriptions/My Subscriptions Like Report Manager?
Hello All,
We are using SQL Server 2005 Reporting Services. We are developing an ASP.NET 2.0 (C#) application to be used as an alternative for Report Manager. We're now to the point of developing functionality to allow users to view, edit, and delete subscriptions. Similar to Report Manager, we want to provide both the ability to see all the subscriptions created by a user (My Subscriptions), as well as all subscription per report (Subscriptions).
In our custom application, how can we implement a listing of all subscriptions per report? And, how can we implement a listing of all subscriptions per user?
Thanks in advance.
You have two requirements:
1. Implement a listing of all subscriptions per report
2. And, how can we implement a listing of all subscriptions per user
For #1, you'll need to use some method (maybe ListSubscriptionsUsingDataSource()) to return subscription objects which represent all the subscriptions on your machine...then, you'll need to check each subscription (using the .Report property) to see what report it "belongs" to...I think what you're hoping to do is simply provide the name of a report to some API and get a list of subscriptions back...there's no such function.
For #2, use the ListSubscriptions method and just pass in the username. You'll get a list of list of that users's subscriptions back.
|||I answered this question in the Newsgroup, but will post the answer here as well. You need to call ListSubscriptions.To get all the subscriptions for a user pass in empty string for the report parameter and the user name for the Owner parameter.
To get all the subscriptions for a given report, pass in the report path for the report parameter and then pass in empty string for the owner.
Please note that the returned subscriptions will only be subscriptions that the user calling ListSubscriptions has permission to see.
No comments:
Post a Comment