2012-03-22 15 views

cevap

4

Bu amaç için Report Server Web Service kullanabilirsiniz. Raporlama Hizmetine rapor yükleyen CreateItem yöntemine sahiptir. Eğer ReportService2010.asmx son nokta için proxy class oluşturabilir ve sonra kullanmanız gerekecektir rdl dosyaları yükler oluşturdu C# projesi için

şöyle geçerli:

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); 
    } 
} 
İlgili konular