/// <summary> /// On print button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPrint_Click(object sender, EventArgs e) { try { if (dgvStockReport.Rows.Count > 0) { decimal decrackId = 0; DataSet dsStockReport = spStock.StockReportPrint(txtproductName.Text, Convert.ToDecimal(cmbBrand.SelectedValue.ToString()), Convert.ToDecimal(cmbModel.SelectedValue.ToString()), txtProductCode.Text, Convert.ToDecimal(cmbGodown.SelectedValue.ToString()), decrackId, Convert.ToDecimal(cmbSize.SelectedValue.ToString()), Convert.ToDecimal(cmbTax.SelectedValue.ToString()), Convert.ToDecimal(cmbProductgroup.SelectedValue.ToString()), txtBatchName.Text); frmReport frmReport = new frmReport(); frmReport.MdiParent = formMDI.MDIObj; frmReport.StockReportPrinting(dsStockReport, txtTotal.Text); } else { Messages.InformationMessage("No data found"); } } catch (Exception ex) { formMDI.infoError.ErrorString = "STKR14:" + ex.Message; } }