Hi,
I need to upload rsc file (report part) programmatically, with c# to SQL Server Reporting Services, I know how to upload RDL files but not rsc.
Here is how I able to upload RDL files:
{ SSRS.ReportingService2005 _rs = new ConsoleApplication2.SSRS.ReportingService2005(); _rs.Url = "http://localhost/ReportServer/ReportService2005.asmx"; _rs.Credentials = System.Net.CredentialCache.DefaultCredentials; FileStream fs = null;string ReportName = string.Empty;byte[] data = null; SSRS.DataSourceReference reff = null; fs = File.OpenRead(@"D:\Report_WIP.rsc"); data = newbyte[fs.Length]; fs.Read(data, 0, (int)fs.Length); _rs.CreateReport("TestName", "/MSS Report Parts folder", true, data, null);//_rs.CreateResource("TestName", "/MSS Report Parts folder", true, data, "application/rs", null);
fs.Close(); }
I tried also CreateResource but I can't find out the .rsc extension mime-type.
Thanks