private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strClient)
      throws IOException, ServletException {
    if (log4j.isDebugEnabled()) log4j.debug("Output: Delete Client");

    ActionButtonDefaultData[] data = null;
    String strHelp = "", strDescription = "", strProcessId = "800147";
    if (vars.getLanguage().equals("en_US"))
      data = ActionButtonDefaultData.select(this, strProcessId);
    else data = ActionButtonDefaultData.selectLanguage(this, vars.getLanguage(), strProcessId);

    if (data != null && data.length != 0) {
      strDescription = data[0].description;
      strHelp = data[0].help;
    }
    String[] discard = {""};
    if (strHelp.equals("")) discard[0] = new String("helpDiscard");
    XmlDocument xmlDocument =
        xmlEngine
            .readXmlTemplate("org/openbravo/erpCommon/ad_process/DeleteClient", discard)
            .createXmlDocument();

    ToolBar toolbar =
        new ToolBar(
            this,
            vars.getLanguage(),
            "DeleteClient",
            false,
            "",
            "",
            "",
            false,
            "ad_process",
            strReplaceWith,
            false,
            true);
    toolbar.prepareSimpleToolBarTemplate();
    xmlDocument.setParameter("toolbar", toolbar.toString());

    xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
    xmlDocument.setParameter(
        "alertMsg",
        "ALERT_MSG=\""
            + Utility.messageBD(this, "GoingToDeleteClient", vars.getLanguage())
            + "\";");
    xmlDocument.setParameter(
        "question", Utility.messageBD(this, "StartProcess?", vars.getLanguage()));
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
    xmlDocument.setParameter("description", strDescription);
    xmlDocument.setParameter("help", strHelp);
    xmlDocument.setParameter("Client", strClient);
    try {
      WindowTabs tabs =
          new WindowTabs(this, vars, "org.openbravo.erpCommon.ad_process.DeleteClient");
      xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
      xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
      xmlDocument.setParameter("childTabContainer", tabs.childTabs());
      xmlDocument.setParameter("theme", vars.getTheme());
      NavigationBar nav =
          new NavigationBar(
              this,
              vars.getLanguage(),
              "DeleteClient.html",
              classInfo.id,
              classInfo.type,
              strReplaceWith,
              tabs.breadcrumb());
      xmlDocument.setParameter("navigationBar", nav.toString());
      LeftTabsBar lBar =
          new LeftTabsBar(this, vars.getLanguage(), "DeleteClient.html", strReplaceWith);
      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("DeleteClient");
      vars.removeMessage("DeleteClient");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }
    xmlDocument.setData(
        "reportClientId", "liststructure", ClientComboData.selectAllClientsNoSystem1(this));

    response.setContentType("text/html; charset=UTF-8");
    PrintWriter out = response.getWriter();
    out.println(xmlDocument.print());
    out.close();
  }
  private void printPageDataSheet(
      HttpServletResponse response,
      VariablesSecureApp vars,
      String strComparative,
      String strDateFrom,
      String strDateTo,
      String strPartnerGroup,
      String strcBpartnerId,
      String strProductCategory,
      String strmProductId,
      String strNotShown,
      String strShown,
      String strDateFromRef,
      String strDateToRef,
      String strOrg,
      String strsalesrepId,
      String strmWarehouseId,
      String strOrder,
      String strMayor,
      String strMenor,
      String strRatioMayor,
      String strRatioMenor,
      String strCurrencyId)
      throws IOException, ServletException {
    if (log4j.isDebugEnabled()) log4j.debug("Output: dataSheet");
    String discard[] = {"selEliminarHeader1"};
    String strCommand = "EDIT_PDF";
    if (strComparative.equals("Y")) {
      discard[0] = "selEliminarHeader2";
      strCommand = "EDIT_PDF_COMPARATIVE";
    }
    XmlDocument xmlDocument = null;
    xmlDocument =
        xmlEngine
            .readXmlTemplate(
                "org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesFilter",
                discard)
            .createXmlDocument();

    ToolBar toolbar =
        new ToolBar(
            this,
            vars.getLanguage(),
            "ReportRefundSalesDimensionalAnalysesFilter",
            false,
            "",
            "",
            "",
            false,
            "ad_reports",
            strReplaceWith,
            false,
            true);
    toolbar.prepareSimpleToolBarTemplate();
    xmlDocument.setParameter("toolbar", toolbar.toString());

    try {
      WindowTabs tabs =
          new WindowTabs(
              this,
              vars,
              "org.openbravo.erpCommon.ad_reports.ReportRefundSalesDimensionalAnalyses");
      xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
      xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
      xmlDocument.setParameter("childTabContainer", tabs.childTabs());
      xmlDocument.setParameter("theme", vars.getTheme());
      NavigationBar nav =
          new NavigationBar(
              this,
              vars.getLanguage(),
              "ReportRefundSalesDimensionalAnalyses.html",
              classInfo.id,
              classInfo.type,
              strReplaceWith,
              tabs.breadcrumb());
      xmlDocument.setParameter("navigationBar", nav.toString());
      LeftTabsBar lBar =
          new LeftTabsBar(
              this,
              vars.getLanguage(),
              "ReportRefundSalesDimensionalAnalyses.html",
              strReplaceWith);
      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("ReportRefundSalesDimensionalAnalyses");
      vars.removeMessage("ReportRefundSalesDimensionalAnalyses");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
    xmlDocument.setParameter("dateFrom", strDateFrom);
    xmlDocument.setParameter("dateFromdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("dateFromsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("dateTo", strDateTo);
    xmlDocument.setParameter("dateTodisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("dateTosaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("dateFromRef", strDateFromRef);
    xmlDocument.setParameter("dateFromRefdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("dateFromRefsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("dateToRef", strDateToRef);
    xmlDocument.setParameter("dateToRefdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("dateToRefsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
    xmlDocument.setParameter("cBpGroupId", strPartnerGroup);
    xmlDocument.setParameter("mProductCategoryId", strProductCategory);
    xmlDocument.setParameter("adOrgId", strOrg);
    xmlDocument.setParameter("salesRepId", strsalesrepId);
    xmlDocument.setParameter("mWarehouseId", strmWarehouseId);
    xmlDocument.setParameter("normal", strOrder);
    xmlDocument.setParameter("amountasc", strOrder);
    xmlDocument.setParameter("amountdesc", strOrder);
    xmlDocument.setParameter("ratioasc", strOrder);
    xmlDocument.setParameter("ratiodesc", strOrder);
    xmlDocument.setParameter("mayor", strMayor);
    xmlDocument.setParameter("menor", strMenor);
    xmlDocument.setParameter("ratioMayor", strRatioMayor);
    xmlDocument.setParameter("ratioMenor", strRatioMenor);
    xmlDocument.setParameter("comparative", strComparative);
    xmlDocument.setParameter("command", strCommand);
    try {
      ComboTableData comboTableData =
          new ComboTableData(
              vars,
              this,
              "TABLEDIR",
              "C_BP_Group_ID",
              "",
              "",
              Utility.getContext(
                  this, vars, "#AccessibleOrgTree", "ReportRefundSalesDimensionalAnalyses"),
              Utility.getContext(
                  this, vars, "#User_Client", "ReportRefundSalesDimensionalAnalyses"),
              0);
      Utility.fillSQLParameters(
          this,
          vars,
          null,
          comboTableData,
          "ReportRefundSalesDimensionalAnalyses",
          strPartnerGroup);
      xmlDocument.setData("reportC_BP_GROUPID", "liststructure", comboTableData.select(false));
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    try {
      ComboTableData comboTableData =
          new ComboTableData(
              vars,
              this,
              "TABLEDIR",
              "M_Product_Category_ID",
              "",
              "",
              Utility.getContext(
                  this, vars, "#AccessibleOrgTree", "ReportRefundSalesDimensionalAnalyses"),
              Utility.getContext(
                  this, vars, "#User_Client", "ReportRefundSalesDimensionalAnalyses"),
              0);
      Utility.fillSQLParameters(
          this,
          vars,
          null,
          comboTableData,
          "ReportRefundSalesDimensionalAnalyses",
          strProductCategory);
      xmlDocument.setData(
          "reportM_PRODUCT_CATEGORYID", "liststructure", comboTableData.select(false));
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    try {
      ComboTableData comboTableData =
          new ComboTableData(
              vars,
              this,
              "TABLEDIR",
              "AD_Org_ID",
              "",
              "",
              Utility.getContext(
                  this, vars, "#AccessibleOrgTree", "ReportRefundSalesDimensionalAnalyses"),
              Utility.getContext(
                  this, vars, "#User_Client", "ReportRefundSalesDimensionalAnalyses"),
              0);
      Utility.fillSQLParameters(
          this, vars, null, comboTableData, "ReportRefundSalesDimensionalAnalyses", strOrg);
      xmlDocument.setData("reportAD_ORGID", "liststructure", comboTableData.select(false));
      comboTableData = null;

    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    try {
      ComboTableData comboTableData =
          new ComboTableData(
              vars,
              this,
              "TABLE",
              "SalesRep_ID",
              "AD_User SalesRep",
              "",
              Utility.getContext(
                  this, vars, "#AccessibleOrgTree", "ReportRefundSalesDimensionalAnalyses"),
              Utility.getContext(
                  this, vars, "#User_Client", "ReportRefundSalesDimensionalAnalyses"),
              0);
      Utility.fillSQLParameters(
          this, vars, null, comboTableData, "ReportRefundSalesDimensionalAnalyses", strsalesrepId);
      xmlDocument.setData("reportSalesRep_ID", "liststructure", comboTableData.select(false));
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    xmlDocument.setData(
        "reportCBPartnerId_IN",
        "liststructure",
        SelectorUtilityData.selectBpartner(
            this,
            Utility.getContext(this, vars, "#AccessibleOrgTree", ""),
            Utility.getContext(this, vars, "#User_Client", ""),
            strcBpartnerId));
    xmlDocument.setData(
        "reportMProductId_IN",
        "liststructure",
        SelectorUtilityData.selectMproduct(
            this,
            Utility.getContext(this, vars, "#AccessibleOrgTree", ""),
            Utility.getContext(this, vars, "#User_Client", ""),
            strmProductId));
    try {
      ComboTableData comboTableData =
          new ComboTableData(
              vars,
              this,
              "TABLEDIR",
              "M_Warehouse_ID",
              "",
              "",
              Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportSalesDimensionalAnalyze"),
              Utility.getContext(
                  this, vars, "#User_Client", "ReportRefundSalesDimensionalAnalyses"),
              0);
      Utility.fillSQLParameters(
          this,
          vars,
          null,
          comboTableData,
          "ReportRefundSalesDimensionalAnalyses",
          strmWarehouseId);
      xmlDocument.setData("reportM_WAREHOUSEID", "liststructure", comboTableData.select(false));
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    xmlDocument.setParameter("ccurrencyid", strCurrencyId);
    try {
      ComboTableData comboTableData =
          new ComboTableData(
              vars,
              this,
              "TABLEDIR",
              "C_Currency_ID",
              "",
              "",
              Utility.getContext(
                  this, vars, "#AccessibleOrgTree", "ReportRefundSalesDimensionalAnalyses"),
              Utility.getContext(
                  this, vars, "#User_Client", "ReportRefundSalesDimensionalAnalyses"),
              0);
      Utility.fillSQLParameters(
          this, vars, null, comboTableData, "ReportRefundSalesDimensionalAnalyses", strCurrencyId);
      xmlDocument.setData("reportC_Currency_ID", "liststructure", comboTableData.select(false));
      comboTableData = null;
    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    if (vars.getLanguage().equals("en_US")) {
      xmlDocument.setData(
          "structure1", ReportRefundSalesDimensionalAnalysesData.selectNotShown(this, strShown));
      xmlDocument.setData(
          "structure2",
          strShown.equals("")
              ? new ReportRefundSalesDimensionalAnalysesData[0]
              : ReportRefundSalesDimensionalAnalysesData.selectShown(this, strShown));
    } else {
      xmlDocument.setData(
          "structure1",
          ReportRefundSalesDimensionalAnalysesData.selectNotShownTrl(
              this, vars.getLanguage(), strShown));
      xmlDocument.setData(
          "structure2",
          strShown.equals("")
              ? new ReportRefundSalesDimensionalAnalysesData[0]
              : ReportRefundSalesDimensionalAnalysesData.selectShownTrl(
                  this, vars.getLanguage(), strShown));
    }

    response.setContentType("text/html; charset=UTF-8");
    PrintWriter out = response.getWriter();
    out.println(xmlDocument.print());
    out.close();
  }