Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to get a list of the rports in my reporting services server using c#.
in the c# project I added a web reference to:
http://servername:portNumber/ReportServer/reportexecution2005.asmx?wsdl

Then

In code I do not know what to do to get access to the list of reports.

I think this is the kind of code I have to use?
C#
CatalogItem items();
            items = rs.ListChildren(@"/MyReports/", false);

            catalogItem item;
            foreach(item in items)
            {
                string s = item.Name;
            }


Any thoughts please?
Thanks
Posted
Updated 19-Sep-11 11:36am
v2

1 solution

Yes, you can definitely do it. It would look like something like this:

C#
ReportService.ReportingService rs = new ReportService.ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://localhost/reportserver/reportservice.asmx";
 
ReportService.CatalogItem[] items = rs.ListChildren("/TestReports", true);
 
for (cnt = 0; cnt <= items.Length - 1; cnt++)
{
listBox1.Items.Add(items[cnt].Name.ToString());
}
 
Share this answer
 
Comments
arkiboys 21-Sep-11 15:56pm    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900