Share via


List reports of a Reporting Services instance via rs.exe script

Simple and easy, no coding or direct access needed to the report server database, simply put the following script in a script file and exectue it via rs.exe

e.g. rs.exe –S https://localhost/ReportServer –i TheScriptFileHere.rss

Put the following lines of code in a script file:

Public Sub Main()

   ListReports()

End Sub
Public Function ListReports() As Boolean
   Console.WriteLine("Available Reports")
   Console.WriteLine(("================================" + Environment.NewLine))
   Dim cat As CatalogItem
   For Each cat In rs.ListChildren("/",true)
    If cat.Type = 2 
         Console.WriteLine(cat.Path)

    End If

   Next cat
End Function

-Jens