c# - File does not upload to Report Server -


I am trying to upload a report from the file system to the report server, but the report is not visible for some reason When I upload it

Here is the section of code:

  WebClient reptserv = new WebClient (); File.WriteAllLines (@ "C: \ HereGoesNothing.rdl", lines); Uri Address = New Uri ("http: // Localhost / Reporters"); Reptserv.UploadFileAsync (address, @ "C: \ HereGoesNothing.rdl");   

Report report is fine in the builder, so I know that this is not an issue, but after that I'm stumped.

Look at the answers to the questions below, this is a better way to get you ...

Actually you add a service in the context of the report server and then upload it through a proxy class, also see:

  Create a static static void (port) {Reporting Services Service = New Reporting Service (); Rscredentials = System.Net.CredentialCache.DefaultCredentials; Byte [] definition = zero; Warning [] warning = faucet; String name = "Geese Notting Here"; {FileStream Stream = File. Open Read (@ "C: \ This hangout is nothing."); Definition = new byte [stream.Length]; Stream Read (definition, 0, (int. Stream. Lamp); Stream.Close (); } Hold (IOException e) {console. WrightLine (E. Message); } {Warning = R. Try Create Report (name, "/", false, definition, blank); If (warning! = Null) {foreach (warning warning in warning) {console. Warning (warning message); }} Else Console.WriteLine ("Report: {0} no warning made successfully", name); } Catch (Easy-to-Speech E) {console. Weedline (ed. Enerxml.ostring ()); }   

}

Comments