Task <byte[]> ExportReport(ExportOptionsBase exportOptions) { ReportServiceClientFactory clientFactory = new ReportServiceClientFactory(new EndpointAddress(ReportServiceAddress)); ReportParameter[] reportParameters = new ReportParameter[] { new ReportParameter() { Path = "stringParameter", Value = ReportParameter } }; return(Task.Factory.ExportReportAsync(clientFactory.Create(), ReportName, exportOptions, reportParameters, null)); }
IReportServiceClient CreateClient() { ReportServiceClientFactory factory = new ReportServiceClientFactory(new EndpointAddress(ReportServiceUri)); return(factory.Create()); }