private void reportViewer1_PrintingBegin(object sender, ReportPrintEventArgs e) { // MessageBox.Show("In payment request !"); //string connection_string = Utils.getConnectionstr(); //LinqtoSQLDataContext dc = new LinqtoSQLDataContext(connection_string); //var rschangepritcheck = from tbl_kacontractsdetailpayment in dc.tbl_kacontractsdetailpayments // where tbl_kacontractsdetailpayment.BatchNo == BatchNo// && tbl_kacontractsdatadetail.ContractNo == contractno // select tbl_kacontractsdetailpayment; //if (rschangepritcheck != null) //{ // foreach (var item in rschangepritcheck) // { // item.PrintChk = true; // item.PrintDate = DateTime.Today; // // item. // dc.SubmitChanges(); // // this.formcreatCtract.loadDetailContractView(contractno); // } //} // this.Close(); }
private void reportViewer1_Print(object sender, ReportPrintEventArgs e) { e.PrinterSettings.DefaultPageSettings.Margins.Right = 0; e.PrinterSettings.DefaultPageSettings.Margins.Left = 0; e.PrinterSettings.DefaultPageSettings.Margins.Top = 0; e.PrinterSettings.DefaultPageSettings.Margins.Bottom = 0; }
private void tagPrint_reportview_PrintingBegin(object sender, ReportPrintEventArgs e) { MySqlConnection conn = new MySqlConnection(connectstr.CONNECTSTR); conn.Open(); MySqlTransaction transaction = conn.BeginTransaction(); try { string strsql = "UPDATE tag_print SET print_status = @print_status WHERE id = @id"; MySqlCommand cmd = new MySqlCommand(); cmd.Connection = conn; cmd.CommandText = strsql; cmd.Parameters.AddWithValue("@print_status", "已打印"); cmd.Parameters.AddWithValue("@id", Convert.ToInt16(printid.Trim())); cmd.ExecuteNonQuery(); } catch (MySqlException ex) { MessageBox.Show("错误代码:" + ex.Number + "这条信息仍然能被打印,但数据状态无法被更新,请尽快与管理员联系!\n错误信息:" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); transaction.Rollback(); conn.Close(); } finally { if (conn.State != ConnectionState.Closed) { transaction.Commit(); conn.Close(); } } }
private void rptViewer_PrintingBegin(object sender, ReportPrintEventArgs e) { if (ter.UpdateDispatchStatus(this.id, 1) <= 0) { MessageBox.Show("Dispatch Status not updated...?", "Dispatch Status", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); } }
private void rvwCotizacion_PrintingBegin(object sender, ReportPrintEventArgs e) { string impresora = e.PrinterSettings.PrinterName; int dePagina = e.PrinterSettings.FromPage; int hastaPagina = e.PrinterSettings.ToPage; int cantidadCopias = e.PrinterSettings.Copies; GeneracionCotizacion("IMPRIMIR", null, null, null, null, impresora, dePagina, hastaPagina, cantidadCopias); }
/// <summary> /// 打印 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void rp_Print(object sender, ReportPrintEventArgs e) { ReportViewer reportViewer = sender as ReportViewer; PrinterSettings setting = new PrinterSettings(); setting.PrintRange = PrintRange.SomePages; setting.FromPage = reportViewer.CurrentPage; setting.ToPage = reportViewer.CurrentPage; e.PrinterSettings = setting; }
private void reportViewer_PrintingBegin(object sender, ReportPrintEventArgs e) { try { reportViewer.PrinterSettings.PrinterName = e.PrinterSettings.PrinterName; reportViewer.PrinterSettings.FromPage = e.PrinterSettings.FromPage; reportViewer.PrinterSettings.ToPage = e.PrinterSettings.ToPage; } catch (Exception ex) { Helper.MensajeError(ex.Message, GlobalClass.NombreApp); } }
private void rvReport_PrintingBegin(object sender, ReportPrintEventArgs e) { if (ReportType == ReportTypes.OR) { ((Receipt)report).PrintReport(); } else if (ReportType == ReportTypes.OFOR) { ((OFReceipt)report).PrintReport(); } else if (ReportType == ReportTypes.PTAOR) { ((PTAReceipt)report).PrintReport(); } }
private void reportViewer1_PrintingBegin(object sender, ReportPrintEventArgs e) { try { if (PrintBatch_CB.Checked == true) { System.Drawing.Printing.PrinterSettings _PrinterSettings = new System.Drawing.Printing.PrinterSettings(); _PrinterSettings.PrinterName = Variables.PrinterName; reportViewer1.PrintDialog(_PrinterSettings); if (BillDataGridView.SelectedRows.Count > 0) { BillNumberSearch_txt.Text = BillDataGridView.SelectedRows[0].Cells["ID"].Value.ToString(); BillDataGridView.SelectedRows[0].Selected = false; Variables.NotificationMessageTitle = this.Name; Variables.NotificationMessageText = BillDataGridView.SelectedRows.Count.ToString(); Variables.NotificationStatus = true; } } } catch (Exception ex) { } }
private void reportViewerTheKho_Print(object sender, ReportPrintEventArgs e) { var ps = e.PrinterSettings; //printDialog1.PrinterSettings; var sb = new StringBuilder(1024); var xr = System.Xml.XmlWriter.Create(sb); xr.WriteStartElement("DeviceInfo"); xr.WriteElementString("OutputFormat", "EMF"); //This is only an estimate _PrintingPageCount = reportViewerTheKho.LocalReport.GetTotalPages(); //Ensure EMF is recorded on a bitmap with the same resolution as the printer _PrintingDPI.X = ps.DefaultPageSettings.PrinterResolution.X; _PrintingDPI.Y = ps.DefaultPageSettings.PrinterResolution.Y; xr.WriteElementString("PrintDpiX", _PrintingDPI.X.ToString()); xr.WriteElementString("PrintDpiY", _PrintingDPI.Y.ToString()); xr.Close(); //Estimate list capacity _PrintingStreams = new List<Stream>(_PrintingPageCount); //Render using the callback API Warning[] warnings; reportViewerTheKho.LocalReport.Render("Image", sb.ToString(), lr_CreateStream, out warnings); //Reset all streams to the beginning foreach (var s in _PrintingStreams) s.Position = 0; e.PrinterSettings = ps; e.Cancel = true; //And print the document as normal var pd = new PrintDocument(); pd.PrinterSettings = e.PrinterSettings;//ps; pd.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0); pd.PrintPage += pd_PrintPage; pd.EndPrint += pd_EndPrint; //pd.Print(); PrintDialog printDialog = new PrintDialog(); printDialog.Document = pd; if (printDialog.ShowDialog() == DialogResult.OK) { pd.Print(); } else { MessageBox.Show("Print Cancelled"); } }
void ReportViewer_Print(object sender, ReportPrintEventArgs e) { var xx = sender; }
private void reportViewer1_PrintingBegin(object sender, ReportPrintEventArgs e) { this.reportViewer1.LocalReport.SetParameters(new ReportParameter("HideBg", "True", true)); this.printing = true; }
private void reportViewer1_Print(object sender, ReportPrintEventArgs e) { Print(); }
private void reportViewer1_Print(object sender, ReportPrintEventArgs e) { this.Close(); }
private void reportViewer1_PrintingBegin(object sender, ReportPrintEventArgs e) { e.PrinterSettings.DefaultPageSettings.Landscape = false; }
private void rptViewer_Print(object sender, ReportPrintEventArgs e) { //MessageBox.Show("print button"); }
private void reportViewer1_SendPrintInfo(object sender, ReportPrintEventArgs e) { notifyIcon1.ShowBalloonTip(5, "Information", "Utskriften har skickats till skrivaren.", ToolTipIcon.Info); WindowState = FormWindowState.Minimized; }
private void ReportViewer1_Print(object sender, ReportPrintEventArgs e) { throw new NotImplementedException(); }
private void reportViewer1_PrintingBegin(object sender, ReportPrintEventArgs e) { Close(); }
private void reportViewer1_PrintingBegin(object sender, ReportPrintEventArgs e) { // MessageBox.Show("se imprimio"); }