/// <summary> /// Function toprint /// </summary> public void ReportPrint() { try { RejectionOutMasterSP spRejectionOutMaster = new RejectionOutMasterSP(); decimal decMaterialReceiptNo = 0; if (cmbMaterialReceiptNo.SelectedIndex != -1) { decMaterialReceiptNo = Convert.ToDecimal(cmbMaterialReceiptNo.SelectedValue.ToString()); } strVoucherNo = txtVoucherNo.Text; strProductCode = txtProductCode.Text; DataSet dsRejectionOut = spRejectionOutMaster.RejectionOutReportPrinting(decmaterialReceiptMasterId, 1, Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToDecimal(cmbVoucherType.SelectedValue.ToString()), strVoucherNo, Convert.ToDecimal(cmbCashOrParty.SelectedValue.ToString()), strProductCode, strProductName); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.RejectionOutReportPrinting(dsRejectionOut); } catch (Exception ex) { formMDI.infoError.ErrorString = "ROREP3:" + ex.Message; } }