void PopualteData() { string TM02_PARTYID = ""; int iTM02_PARTYID = 0; if (!string.IsNullOrEmpty(cmbName.Text.Trim())) { int.TryParse(cmbName.SelectedValue.ToString(), out iTM02_PARTYID); } if (iTM02_PARTYID > 0) { TM02_PARTYID = iTM02_PARTYID.ToString(); } DAL dl = new DAL(); DataTable dt = new DataTable(); dt = dl.SelectMethod("exec USP_VP_GET_CUSTOMER_BAL_SUMMARY '" + TM02_PARTYID + "','" + Datalayer.iT001_COMPANYID + "'"); if (dt.Rows.Count > 0) { DataTable dt1 = new DataTable(); DataRow[] dr = dt.Select("TOTALSALE >0 "); if (dr.Length > 0) { dt1 = dr.CopyToDataTable(); } ReportDocument RptDoc = new ReportDocument(); RptDoc.Load(Application.StartupPath + @"\Report\rptCustomerBalSummary.rpt"); RptDoc.SetDataSource(dt1); Datalayer.RptReport = RptDoc; Datalayer.sReportName = "Customer Balance Report"; Report.frmReportViwer fmReport = new Report.frmReportViwer(); fmReport.Show(); } else { Datalayer.InformationMessageBox("No Record.."); } }