You can use Render
method of ReportExecutionService without any problem. You need to add a service reference to ReportExecution2005 which is the Execution Endpoint of report server.
Example
Below example has been taken from msdn and used by some small changes. To see the original example take a look at msdn example. When using, pay attention to use PDF
as format and also about the report path it should be the path of your report starting by /
and ending with report name without .rdl
.
ReportExecutionService rs = new ReportExecutionService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://MyServer/reportserver/ReportExecution2005.asmx";
/* Render arguments */
byte[] result = null;
string reportPath = "/MyFolder/MyReport";
string format = "PDF";
string historyID = null;
string devInfo = @"<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>";
/* Prepare report parameter.*/
ParameterValue[] parameters = new ParameterValue[1];
parameters[0] = new ParameterValue();
parameters[0].Name = "SomeParameter";
parameters[0].Value = "SomeValue";
DataSourceCredentials[] credentials = null;
string showHideToggle = null;
string encoding;
string mimeType;
string extension;
Warning[] warnings = null;
ParameterValue[] reportHistoryParameters = null;
string[] streamIDs = null;
ExecutionInfo execInfo = new ExecutionInfo();
ExecutionHeader execHeader = new ExecutionHeader();
rs.ExecutionHeaderValue = execHeader;
/*Load and Render Report*/
execInfo = rs.LoadReport(reportPath, historyID);
rs.SetExecutionParameters(parameters, "en-us");
String SessionId = rs.ExecutionHeaderValue.ExecutionID;
result = rs.Render(format, devInfo, out extension, out encoding,
out mimeType, out warnings, out streamIDs);
execInfo = rs.GetExecutionInfo();
/*Save File*/
System.IO.File.WriteAllBytes(@"d:\report.pdf", result);