For this purpose, you can use the report server web service . This method has a CreateItem that loads the report into the report service.
To create a C # project that loads rdl files, you need to create a proxy class for your ReportService2010.asmx endpoint, and then use it like this
ReportingService2010 reportingService = new ReportingService2010(); reportingService.Url = url + "/ReportService2010.asmx"; reportingService.Credentials = new System.Net.NetworkCredential(username, password, domain); Microsoft.SqlServer.ReportingServices2010.Warning[] warnings = null; using (FileStream reportStream = new FileStream("c:\\report.rdl", FileMode.Open, FileAccess.Read)) { using (MemoryStream ms = new MemoryStream()) { reportStream.CopyTo(ms); CatalogItem report = reportingService.CreateCatalogItem( "Report", "Report1", "/", true, ms.ToArray(), null, out warnings); } }
Denis palnitsky
source share