public void makeTableContent() {
    prepareParamVO(
        new ReportParamVO(),
        WEB_PARAM_KEY + WebModules.MENU_REPORT_MATM_PURCHASE,
        "th.syslogno",
        WebConstants.SORT_ORDER_ASC);

    String[] arrayHeader = {
      getText("l.dateTime"),
      getText("l.transactionNo"),
      getText("l.merchantCode"),
      getText("l.merchantName"),
      getText("l.hostRef"),
      getText("l.lastRc")
    };

    String[] arrayBody = {
      "receivedTime", "syslogno", "merchantCode", "merchantName", "btiRefNo", "lastRc"
    };

    String[] arrayDbVariable = {
      "th.received_time",
      "th.syslogno",
      "th.merchant_code",
      "th.merchant_name",
      "th.bti_ref_no",
      "th.last_rc"
    };

    List<LinkTableVO> listLinkTable = new ArrayList<LinkTableVO>();

    ReportParamVO reportParamVO = (ReportParamVO) paramVO;
    int totalRow = reportService.countMatmReportByParam(reportParamVO);
    listMatmPurchase = reportService.findMatmByParam(reportParamVO);
    Locale language = (Locale) session.get(WEB_LOCALE_KEY);
    resultSearchJson =
        webSearchResultService.composeSearchResultWithExport(
            getText("l.listMatmPurchase"),
            arrayHeader,
            arrayBody,
            arrayDbVariable,
            gson.toJson(listMatmPurchase),
            getCurrentPage(),
            totalRow,
            listLinkTable,
            language,
            listMatmPurchase.size(),
            paramVO);
  }
 public String processSearch() {
   if (StringUtils.isEmpty(exportType)) {
     makeTableContent();
     return "searchJson";
   } else {
     prepareParamVO(
         new MerchantParamVO(),
         WEB_PARAM_KEY + WebModules.MENU_REPORT_MATM_PURCHASE,
         "th.syslogno",
         WebConstants.SORT_ORDER_ASC);
     ReportParamVO reportParamVO = (ReportParamVO) paramVO;
     listMatmPurchase = reportService.findMatmByParamNoPaging(reportParamVO);
     reportParameters = new HashMap<String, String>();
     generateExportParameter(reportParamVO, reportParameters);
     if (exportType.equals(PDF)) return PDF;
     else if (exportType.equals(XLS)) return XLS;
     else return CSV;
   }
 }