ReportExecution2005 LoadReport error
I'm using ReportExecution2005 (re) to render report. Before calling re.Render, I do re.LoadReport(reportPath, null). But the load line gives the error:
Client found response content type of '', but expected 'text/xml'. The request failed with an empty response.
I saw many discussions online about this error, still lost. Here is my code. I guess the error is caused by something before this method was called.
string deviceInfo;
Byte[] myPage = null;
string encoding;
string mimeType = "text/html";
Reportexecution2005.Warning[] warnings = null;
string[] streamIDs = null;
string historyId = null;
string extension;
deviceInfo = String.Format(@"<DeviceInfo><OutputFormat>{0}</OutputFormat></DeviceInfo>", "emf");
re.LoadReport(reportFolder + "/" + reportName, historyId);
myPage = re.Render(format, //format can be pdf or image
deviceInfo,
out extension,
out mimeType,
out encoding,
out warnings,
out streamIDs);
Please let me know where I should check. Thanks!
September 10th, 2011 1:20pm
Check the URL you are setting on the connection object. It should look something like "http://myserver/ReportServer/ReportExecution2005.asmx".
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2011 6:19pm