public void setContactAddPageDataFields() { try { CommonOperInterface cbt = new CommonConFactory().createInterface(); List<GridDataPropertyView> gridFields = Configuration.getConfigurationData( "mapped_common_contact_configuration", accountID, connectionSpace, "", 0, "table_name", "common_contact_configuration"); if (gridFields != null) { contactDD = new ArrayList<ConfigurationUtilBean>(); for (GridDataPropertyView gdp : gridFields) { ConfigurationUtilBean objdata = new ConfigurationUtilBean(); if (gdp.getColType().trim().equalsIgnoreCase("D")) { objdata.setKey(gdp.getColomnName()); objdata.setValue(gdp.getHeadingName()); objdata.setColType(gdp.getColType()); objdata.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true); contactDD.add(objdata); if (gdp.getColomnName().equalsIgnoreCase("regLevel")) { officeMap = new HashMap<Integer, String>(); List data = cbt.executeAllSelectQuery( " select levelName from mapped_orgleinfo_level ", connectionSpace); if (data != null && data.size() > 0 && data.get(0) != null) { String arr[] = data.get(0).toString().split("#"); for (int i = 0; i < arr.length; i++) { officeMap.put(i + 1, arr[i].toString()); } } } } } } } catch (Exception e) { e.printStackTrace(); } }
// Define A method for Creating Excel File public String createExcel( String titleString, String sheetString, String subTitleString, List data, String[] headerTitles, String titleKey, String filePath) { String file = null; Workbook wb; int col = 0; try { // check Header Title if (headerTitles != null && headerTitles.length > 0) col = headerTitles.length; wb = (Workbook) new HSSFWorkbook(); // Hear we are getting whole property List<ConfigurationUtilBean> titleMap = new CustomerCommonPropertyMap().getTitles(titleKey); Map<String, CellStyle> styles = createStyles(wb); Sheet sheet = wb.createSheet(sheetString); PrintSetup printSetup = sheet.getPrintSetup(); printSetup.setLandscape(true); sheet.setFitToPage(true); sheet.setHorizontallyCenter(true); Header header = sheet.getHeader(); header.setCenter("Center Header"); header.setLeft("Left Header"); header.setRight("Right Footer"); Footer footer = sheet.getFooter(); footer.setCenter("center footer"); footer.setLeft("left footer"); footer.setRight("right footer"); // Title Row.... Row titleRow = sheet.createRow(0); titleRow.setHeightInPoints(20); Cell titleCell = titleRow.createCell(0); titleCell.setCellValue(titleString); titleCell.setCellStyle(styles.get("title")); sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, col - 1)); // Sub Title Row..... // System.out.println("Sub Title String >>>>>>"+subTitleString); Row headerRow = null; if (subTitleString != "") { Row subTitleRow = sheet.createRow(1); subTitleRow.setHeightInPoints(18); Cell subTitleCell = subTitleRow.createCell(0); subTitleCell.setCellValue(subTitleString); subTitleCell.setCellStyle(styles.get("subTitle")); sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, col - 1)); headerRow = sheet.createRow(2); headerRow.setHeightInPoints(15); // } else { headerRow = sheet.createRow(1); headerRow.setHeightInPoints(15); } Cell headerCell = null; if (headerTitles != null) { for (ConfigurationUtilBean cell : titleMap) { int titleIndex = 0; for (int i = 0; i < headerTitles.length; i++) { if (cell.getKey().equalsIgnoreCase(headerTitles[titleIndex].trim())) { headerCell = headerRow.createCell(titleIndex); headerCell.setCellValue(cell.getValue()); headerCell.setCellStyle(styles.get("header")); } titleIndex++; } } } Row dataRow = null; Cell dataCell = null; int rowIndex = 2; /* List Iteration text */ try { if (data != null && data.size() > 0) { for (Iterator it = data.iterator(); it.hasNext(); ) { Object[] obdata = (Object[]) it.next(); dataRow = sheet.createRow(rowIndex); for (int cellIndex = 0; cellIndex < headerTitles.length; cellIndex++) { dataCell = dataRow.createCell(cellIndex); if (obdata[cellIndex] != null && !obdata[cellIndex].toString().equalsIgnoreCase("")) { dataCell.setCellValue(obdata[cellIndex].toString()); } else { dataCell.setCellValue("NA"); } } rowIndex++; } } } catch (Exception e) { // TODO: handle exception } for (int titleIndex = 0; titleIndex < headerTitles.length; titleIndex++) sheet.autoSizeColumn(titleIndex); // adjust width of the column file = filePath + File.separator + "OpportunityReportDetail_" + DateUtil.getCurrentDateIndianFormat() + (DateUtil.getCurrentTimeHourMin()).replaceAll(":", "-") + ".xls"; if (wb instanceof XSSFWorkbook) file += "x"; FileOutputStream out = new FileOutputStream(file); wb.write(out); out.close(); } catch (Exception e) { e.printStackTrace(); } finally { } return file; }
// Define A method for Creating Excel File public String createExcelformate( String titleString, String sheetString, String[] headerTitles, String titleKey, String filePath) { String file = null; Workbook wb; int col = 0; try { // check Header Title if (headerTitles != null && headerTitles.length > 0) col = headerTitles.length; wb = (Workbook) new HSSFWorkbook(); // Hear we are getting whole property List<ConfigurationUtilBean> titleMap = new CustomerCommonPropertyMap().getTitles(titleKey); Map<String, CellStyle> styles = createStyles(wb); Sheet sheet = wb.createSheet(sheetString); PrintSetup printSetup = sheet.getPrintSetup(); printSetup.setLandscape(true); sheet.setFitToPage(true); sheet.setHorizontallyCenter(true); Header header = sheet.getHeader(); header.setCenter("Center Header"); header.setLeft("Left Header"); header.setRight("Right Footer"); Footer footer = sheet.getFooter(); footer.setCenter("center footer"); footer.setLeft("left footer"); footer.setRight("right footer"); // Title Row.... Row titleRow = sheet.createRow(0); titleRow.setHeightInPoints(20); Cell titleCell = titleRow.createCell(0); titleCell.setCellValue(titleString); titleCell.setCellStyle(styles.get("title")); sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, col - 1)); // Row headerRow = sheet.createRow(1); headerRow.setHeightInPoints(15); Cell headerCell = null; if (headerTitles != null) { for (ConfigurationUtilBean cell : titleMap) { int titleIndex = 0; for (int i = 0; i < headerTitles.length; i++) { if (cell.getKey().equalsIgnoreCase(headerTitles[titleIndex].trim())) { headerCell = headerRow.createCell(titleIndex); headerCell.setCellValue(cell.getValue()); headerCell.setCellStyle(styles.get("header")); } titleIndex++; } } } for (int titleIndex = 0; titleIndex < headerTitles.length; titleIndex++) sheet.autoSizeColumn(titleIndex); // adjust width of the column file = filePath + File.separator + "ContactReport" + DateUtil.getCurrentDateIndianFormat() + (DateUtil.getCurrentTime()).replaceAll(":", "-") + ".xls"; if (wb instanceof XSSFWorkbook) file += "x"; FileOutputStream out = new FileOutputStream(file); wb.write(out); out.close(); } catch (Exception e) { e.printStackTrace(); } finally { } return file; }
@SuppressWarnings("unchecked") public String createPdf(List data, String[] headerTitles, String titleKey, String filePath) { int col = 0; String fileName = null; PdfPCell cell = null; try { if (headerTitles != null && headerTitles.length > 0) col = headerTitles.length; List<ConfigurationUtilBean> titleMap = new CustomerCommonPropertyMap().getTitles(titleKey); Document document = new Document(PageSize.A4, 20, 20, 50, 50); fileName = filePath + File.separator + "Customer Report" + DateUtil.getCurrentDateIndianFormat() + (DateUtil.getCurrentTime()).replaceAll(":", "-") + ".pdf"; PdfWriter.getInstance(document, new FileOutputStream(fileName)); document.open(); PdfPTable table = new PdfPTable(col); table.setWidthPercentage(100f); float[] widths = new float[col]; for (int wx = 0; wx < col; wx++) widths[wx] = 100f / col; table.setWidths(widths); table.setHeaderRows(2); if (headerTitles != null) { for (ConfigurationUtilBean title : titleMap) { for (int i = 0; i < headerTitles.length; i++) { if (title.getKey().equalsIgnoreCase(headerTitles[i].trim())) { cell = new PdfPCell(new Paragraph(title.getValue())); cell.setBackgroundColor(new BaseColor(204, 204, 204)); cell.setBorderColor(new BaseColor(170, 170, 170)); cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); table.addCell(cell); } } } } int altr = 1; String cellValue = "NA"; try { if (data != null && data.size() > 0) { for (Iterator it = data.iterator(); it.hasNext(); ) { Object[] obdata = (Object[]) it.next(); for (int cellIndex = 0; cellIndex < headerTitles.length; cellIndex++) { if (obdata[cellIndex] != null && !obdata[cellIndex].toString().equalsIgnoreCase("")) { cell = new PdfPCell(new Paragraph(obdata[cellIndex].toString())); } else { cell = new PdfPCell(new Paragraph(cellValue)); } if (altr % 2 == 0) { cell.setBackgroundColor(new BaseColor(240, 240, 240)); cell.setBorderColor(new BaseColor(170, 170, 170)); } else { cell.setBackgroundColor(new BaseColor(255, 255, 255)); cell.setBorderColor(new BaseColor(170, 170, 170)); } cell.setHorizontalAlignment(Element.ALIGN_CENTER); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); table.addCell(cell); } altr++; } } } catch (Exception e) { e.printStackTrace(); // TODO: handle exception } document.add(table); document.close(); } catch (Exception e) { e.printStackTrace(); // TODO: handle exception } return fileName; }
@SuppressWarnings("rawtypes") public void setContactDataFieldsToAdd(String mappedTable, String configTable) { try { CommonOperInterface cbt = new CommonConFactory().createInterface(); List<GridDataPropertyView> gridFields = Configuration.getConfigurationData( mappedTable, accountID, connectionSpace, "", 0, "table_name", configTable); if (gridFields != null) { deptMap = new HashMap<Integer, String>(); contactFormDDBox = new ArrayList<ConfigurationUtilBean>(); contactTextBox = new ArrayList<ConfigurationUtilBean>(); industryMap = new HashMap<Integer, String>(); contactFileBox = new ArrayList<ConfigurationUtilBean>(); contactDateTimeBox = new ArrayList<ConfigurationUtilBean>(); for (GridDataPropertyView gdp : gridFields) { ConfigurationUtilBean objdata = new ConfigurationUtilBean(); if (gdp.getColType().trim().equalsIgnoreCase("T") && !gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("createdDate") && !gdp.getColomnName().equalsIgnoreCase("createdAt") && !gdp.getColomnName().equalsIgnoreCase("userAccountId") && !gdp.getColomnName().equalsIgnoreCase("flag")) { objdata.setKey(gdp.getColomnName()); objdata.setValue(gdp.getHeadingName()); objdata.setColType(gdp.getColType()); objdata.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true); contactTextBox.add(objdata); } else if (gdp.getColType().trim().equalsIgnoreCase("F") && !gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("createdDate") && !gdp.getColomnName().equalsIgnoreCase("createdAt")) { objdata.setKey(gdp.getColomnName()); objdata.setValue(gdp.getHeadingName()); objdata.setColType(gdp.getColType()); objdata.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true); contactFileBox.add(objdata); } else if (gdp.getColType().trim().equalsIgnoreCase("date")) { objdata.setKey(gdp.getColomnName()); objdata.setValue(gdp.getHeadingName()); objdata.setColType(gdp.getColType()); objdata.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true); contactDateTimeBox.add(objdata); } else if (gdp.getColType().trim().equalsIgnoreCase("D")) { objdata.setKey(gdp.getColomnName()); objdata.setValue(gdp.getHeadingName()); objdata.setColType(gdp.getColType()); objdata.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objdata.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objdata.setMandatory(true); contactFormDDBox.add(objdata); if (gdp.getColomnName().equalsIgnoreCase("industry")) { List data = cbt.executeAllSelectQuery( "select id,industry from industrydatalevel1", connectionSpace); if (data != null && data.size() > 0) { for (Iterator iterator = data.iterator(); iterator.hasNext(); ) { Object[] object = (Object[]) iterator.next(); if (object[0] != null && object[1] != null) { industryMap.put(Integer.parseInt(object[0].toString()), object[1].toString()); } } } } /*else if (getRegLevel() != null) { List data = cbt.executeAllSelectQuery( "select id,deptName from department where mappedOrgnztnId='" + getRegLevel() + "'", connectionSpace); if (data != null && data.size() > 0) { for (Iterator iterator = data.iterator(); iterator .hasNext();) { Object[] object = (Object[]) iterator .next(); if (object[0] != null && object[1] != null) { deptMap.put(Integer.parseInt(object[0] .toString()), object[1] .toString()); } } } }*/ } } } } catch (Exception e) { e.printStackTrace(); } }
public void setViewPageProps() { try { if (empForAddBasic == 1) { setContactAddPageDataFields(); setContactDataFieldsToAdd("mapped_emp_contact_configuration", "emp_contact_configuration"); } if (empForAddPrsl == 1) { List<GridDataPropertyView> empPer = Configuration.getConfigurationData( "mapped_employee_basic_configuration", accountID, connectionSpace, "", 0, "table_name", "employee_personal_configuration"); ConfigurationUtilBean objEjb = null; if (empPer != null) { empPerFileBox = new ArrayList<ConfigurationUtilBean>(); for (GridDataPropertyView gdp : empPer) { objEjb = new ConfigurationUtilBean(); if (gdp.getColType().equalsIgnoreCase("T")) { if (!gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("date") && !gdp.getColomnName().equalsIgnoreCase("time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empPerLevels.add(objEjb); } } if (gdp.getColType().trim().equalsIgnoreCase("F") && !gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("date") && !gdp.getColomnName().equalsIgnoreCase("time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empPerFileBox.add(objEjb); // System.out.println("empPerFileBox" +empPerFileBox.size()); } else if (gdp.getColType().equalsIgnoreCase("Time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empPerCalendr.add(objEjb); } else if (gdp.getColType().equalsIgnoreCase("D")) empNameForOther = gdp.getHeadingName(); } } } if (empForAddWorkQua == 1) { List<GridDataPropertyView> empQua = Configuration.getConfigurationData( "mapped_employee_basic_configuration", accountID, connectionSpace, "", 0, "table_name", "employee_work_exprience_configuration"); ConfigurationUtilBean objEjb = null; if (empQua != null) { empWorkExpFileBox = new ArrayList<ConfigurationUtilBean>(); for (GridDataPropertyView gdp : empQua) { objEjb = new ConfigurationUtilBean(); if (gdp.getColType().equalsIgnoreCase("T")) { if (!gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("date") && !gdp.getColomnName().equalsIgnoreCase("time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empWorkExpLevels.add(objEjb); } } else if (gdp.getColType().equalsIgnoreCase("Time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empWorkExpCalendr.add(objEjb); } if (gdp.getColType().trim().equalsIgnoreCase("F") && !gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("date") && !gdp.getColomnName().equalsIgnoreCase("time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empWorkExpFileBox.add(objEjb); // System.out.println("empWorkExpFileBox" +empWorkExpFileBox.size()); } else if (gdp.getColType().equalsIgnoreCase("D")) empNameForOther = gdp.getHeadingName(); } } } // System.out.println("empForAddWorkExpirence" +empForAddWorkExpirence); if (empForAddWorkExpirence == 1) { // System.out.println("empForAddWorkExpirence" +empForAddWorkExpirence); List<GridDataPropertyView> empQua = Configuration.getConfigurationData( "mapped_employee_basic_configuration", accountID, connectionSpace, "", 0, "table_name", "employee_work_exprience_configuration"); ConfigurationUtilBean objEjb = null; if (empQua != null) { bankFileBox = new ArrayList<ConfigurationUtilBean>(); for (GridDataPropertyView gdp : empQua) { objEjb = new ConfigurationUtilBean(); if (gdp.getColType().equalsIgnoreCase("T")) { if (!gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("date") && !gdp.getColomnName().equalsIgnoreCase("time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empWorkExpLevels.add(objEjb); } } else if (gdp.getColType().equalsIgnoreCase("Time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empWorkExpCalendr.add(objEjb); } else if (gdp.getColType().equalsIgnoreCase("D")) empNameForOther = gdp.getHeadingName(); } } } if (empForAddBaank == 1) { // for bank details List<GridDataPropertyView> empBank = Configuration.getConfigurationData( "mapped_employee_basic_configuration", accountID, connectionSpace, "", 0, "table_name", "employee_bank_details_configuration"); ConfigurationUtilBean objEjb = null; if (empBank != null) { bankFileBox = new ArrayList<ConfigurationUtilBean>(); for (GridDataPropertyView gdp : empBank) { objEjb = new ConfigurationUtilBean(); if (gdp.getColType().equalsIgnoreCase("T")) { if (!gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("date") && !gdp.getColomnName().equalsIgnoreCase("time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); empBankLevels.add(objEjb); } } // System.out.println("getColomnName" +gdp.getColomnName()); if (gdp.getColType().trim().equalsIgnoreCase("F") && !gdp.getColomnName().equalsIgnoreCase("userName") && !gdp.getColomnName().equalsIgnoreCase("date") && !gdp.getColomnName().equalsIgnoreCase("time")) { objEjb.setKey(gdp.getColomnName()); objEjb.setValue(gdp.getHeadingName()); objEjb.setColType(gdp.getColType()); objEjb.setValidationType(gdp.getValidationType()); if (gdp.getMandatroy() == null) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("0")) objEjb.setMandatory(false); else if (gdp.getMandatroy().equalsIgnoreCase("1")) objEjb.setMandatory(true); bankFileBox.add(objEjb); // System.out.println("bankFileBox" +bankFileBox.size()); } else if (gdp.getColType().equalsIgnoreCase("D") && gdp.getColomnName().equalsIgnoreCase("empName")) empNameForOther = gdp.getHeadingName(); else if (gdp.getColType().equalsIgnoreCase("D")) accountTypeLevel = gdp.getHeadingName(); } } } } catch (Exception me) { me.printStackTrace(); } }