Hi
Thank you for your interest in Aspose.Words for Reporting Services. Here is a nice article that describes how to render reports programmatically.
http://www.codeproject.com/KB/reporting-services/PDFUsingSQLRepServices.aspx
I created sample code based on this article that shows how to render the report in DOC format.
// Create a new proxy to the web service
rs2005.ReportingService2005 rs = new rs2005.ReportingService2005();
rsExecService.ReportExecutionService rsExec = new rsExecService.ReportExecutionService();
// Authenticate to the Web service using Windows credentials
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Assign the URL of the Web service
rs.Url = "http://localhost/ReportServer/ReportService2005.asmx";
rsExec.Url = "http://localhost/ReportServer/ReportExecution2005.asmx";
// Prepare Render arguments
string historyID = null;
string deviceInfo = null;
string format = "AWDOC";
Byte[] results;
string encoding = String.Empty;
string mimeType = String.Empty;
string extension = String.Empty;
rsExecService.Warning[] warnings = null;
string[] streamIDs = null;
// Default Path;
string fileName = @"c:\Temp\samplereport.doc";
// Define variables needed for GetParameters() method
// Get the report name
string _reportName = @"/AdventureWorks Sample Reports/Sales Order Detail";
string _historyID = null;
bool _forRendering = false;
rs2005.ParameterValue[] _values = null;
rs2005.DataSourceCredentials[] _credentials = null;
rs2005.ReportParameter[] _parameters = null;
try
{
// Get if any parameters needed.
_parameters = rs.GetReportParameters(_reportName, _historyID,
_forRendering, _values, _credentials);
// Load the selected report.
rsExecService.ExecutionInfo ei =
rsExec.LoadReport(_reportName, historyID);
// Prepare report parameter.
// Set the parameters for the report needed.
rsExecService.ParameterValue[] parameters =
new rsExecService.ParameterValue[1];
// Place to include the parameter.
if (_parameters.Length > 0)
{
parameters[0] = new rsExecService.ParameterValue();
parameters[0].Label = "SalesOrderNumber";
parameters[0].Name = "SalesOrderNumber";
parameters[0].Value = "SO50750";
}
rsExec.SetExecutionParameters(parameters, "en-us");
results = rsExec.Render(format, deviceInfo,
out extension, out encoding,
out mimeType, out warnings, out streamIDs);
// Create a file stream and write the report to it
using (FileStream stream = File.OpenWrite(fileName))
{
stream.Write(results, 0, results.Length);
}
}
catch (Exception ex)
{
Console.Write(ex.Message);
}
Hope this could be useful for you.
Best regards.