/// <summary> /// On 'Print' button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvDailyAttendanceReport.RowCount > 0) { DataSet ds = new DataSet(); CompanySP spCompany = new CompanySP(); DataTable dtblCompany = spCompany.CompanyViewDataTable(1); ds.Tables.Add(dtblCompany); DailyAttendanceMasterSP spDailyAttendanceMaster = new DailyAttendanceMasterSP(); DataTable dtblAttendance = spDailyAttendanceMaster.DailyAttendanceViewForDailyAttendanceReport(dtpDate.Text.Trim(), cmbStatus.Text.Trim(), cmbEmployee.Text.Trim(), cmbDesignation.Text.Trim()); ds.Tables.Add(dtblAttendance); frmReport frmReportObj = new frmReport(); frmReportObj.MdiParent = formMDI.MDIObj; frmReportObj.DailyAttendanceReportPrinting(ds); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { formMDI.infoError.ErrorString = "DAR:8" + ex.Message; } }