BasicHttpBinding binding = new BasicHttpBinding(); EndpointAddress address = new EndpointAddress("http://IPaddress:Port/Services/Myservice.svc"); ChannelFactory<Services.Myservice> driver = new ChannelFactory<Services.Myservice>(binding, address); Services.Myservice channel = driver.CreateChannel(); Warning[] warnings; string[] streamIds; string mimeType = string.Empty; string encoding = string.Empty; string extension = string.Empty; ReportDataSource datasource = new ReportDataSource("DataSetName",channel.MyMethod()); // Setup the report viewer object and get the array of bytes ReportViewer viewer = new ReportViewer(); viewer.ProcessingMode = ProcessingMode.Local; viewer.LocalReport.ReportPath = @"Reports\Report1.rdlc"; viewer.LocalReport.DataSources.Add(datasource); // Add datasource here //Here is the part the program stop at byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings); string date = DateTime.Now.ToString(); System.IO.File.Create(@"E:\Report_"+date+".pdf"); System.IO.File.WriteAllBytes(@"E:\Report_" + date + ".pdf", bytes);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)