private void DocDetailsSubRpr(object sender, SubreportProcessingEventArgs e) { DocPuiRequisiciones rq = new DocPuiRequisiciones(db); rq.keyidMov = IdMo; DataTable dt = rq.DocDetPrint(); ReportDataSource ds = new ReportDataSource("DoctosDet", dt); e.DataSources.Add(ds); }
private void btnImprimir_Click(object sender, EventArgs e) { try { String cv = grdView[0, grdView.CurrentRow.Index].Value.ToString(); String cvDoc = grdView[1, grdView.CurrentRow.Index].Value.ToString(); String Desc = grdView[8, grdView.CurrentRow.Index].Value.ToString(); String Tot = grdView[10, grdView.CurrentRow.Index].Value.ToString(); Tot = string.Format(nfi, "{0:C}", Convert.ToDouble(Tot)); DocPuiRequisiciones rq = new DocPuiRequisiciones(db); rq.keyidMov = cv; DataTable dt = rq.DocDetPrint(); fmtoTicket print = new fmtoTicket(); String pict = Convert.ToString(GAFE.Properties.Resources.Editar); print.PrintTicket(db, user, dt, "RE:" + cvDoc, Tot, "0", "----", "-----"); } catch (Exception ex) { MessageBoxAdv.Show("Tienes que seleccionar un registro\n" + ex.Message, "Alerta", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }