Problem with rs.listsubscriptions

  • Hi Guys,

    I am having problems when I use a rs.listsubscriptions to get a list of subscriptions id which will be later used in the rs.firevent method. My intention is to find all reports in a destination folder on the report server whose name starts with a word "Monthly" or "Daily". The sample code i have written is given below. Any help to solve this will be appreciated. My exposure to SSRS is very limited.

    Sub Main()

    Try

    Dim subscriptions As Subscription() = Nothing

    Dim i as Integer

    Dim y as Integer

    subscriptions = rs.ListSubscriptions("/TEST REPORTS/Monthly", Nothing)

    y = subscriptions.length

    console.writeline(subscriptions.length)

    If Not (subscriptions Is Nothing) Then

    for i = 0 to y-1

    console.writeline(subscriptions(i).SubscriptionID)

    next

    End If

    Catch ex As Exception

    Console.WriteLine(ex.Message)

    End Try

    End Sub

    The error message says that it cannot find the particular item. All report and subscriptions names start with either "Monthly" or "Daily".

  • I'm new to Reporting Services, but at first blush it looks as if you want to retrieve the subscription for the report "Monthly", when what I believe you are trying to do is mask the report name, ala LIKE 'Mothly%'.

    Is there a way to specify /TEST REPORTS/Monthly as a mask, rather than make it look like a specific report?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply