public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { empPrintSlip rpt = new empPrintSlip(); rpt.Site = this.Site; return(rpt); }
private void printSlip() { try { empPayDataset newdataset = new empPayDataset(); DataRow row = newdataset.Tables["Payment"].NewRow(); row[0] = id; row[1] = name; row[2] = salary; row[3] = months; row[4] = status; row[5] = pdate; row[6] = due; row[7] = payment; row[8] = balance; row[9] = description; newdataset.Tables["Payment"].Rows.Add(row); empPrintSlip myreport = new empPrintSlip(); myreport.SetDataSource(newdataset); EMPRepotViews emv = new EMPRepotViews(); emv.crystalReportViewer1.ReportSource = myreport; emv.Show(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { empPrintSlip rpt = new empPrintSlip(); rpt.Site = this.Site; return rpt; }