private void paymentForm_FormTransactionSuccess(object sender, FormTransactionSuccessArgs <Payment> e) { //OnFormTransactionSuccess(new FormTransactionSuccessArgs<ServiceBooking>(_serviceBooking, true)); MessageBox.Show(@"Transaction success"); using (var printer = new LocalReportPrinter(@"PointOfSalesModule\ServiceBooking\Create\Receipt.rdlc")) { printer.AddDataSource(@"ServiceBooking", new List <ServiceBooking> { _serviceBooking }); printer.Run(); } Dispose(); }
private void buttonSavedPartnerReportSilentPrint_Click(object sender, EventArgs e) { // https://msdn.microsoft.com/en-us/library/ms252091.aspx using (ServiceReference.ServiceClient client = new ServiceReference.ServiceClient()) { using (LocalReport localReport = new LocalReport()) { BaseDataSource datasource = client.GetSavedReport(1); if (datasource != null) { datasource.Configure(localReport); using(LocalReportPrinter localReportPrint = new LocalReportPrinter(localReport/*, "Microsoft XPS Document Writer"*/)) { localReportPrint.Print(); } } } } }