private void printPageDataPDF(
      HttpServletRequest request,
      HttpServletResponse response,
      VariablesSecureApp vars,
      String strFinReconciliationId,
      String strFinFinancialAccountName,
      String strDateTo,
      String strReportType)
      throws IOException, ServletException {
    log4j.debug("Output: Reconciliation PDF report");

    String reportType = (strReportType == null) ? "DETAIL" : strReportType;

    String strMainReportName =
        "@basedesign@/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.jrxml";
    FIN_Reconciliation reconciliation = null;
    OBContext.setAdminMode(true);
    try {
      reconciliation = OBDal.getInstance().get(FIN_Reconciliation.class, strFinReconciliationId);
    } finally {
      OBContext.restorePreviousMode();
    }
    HashMap<String, Object> parameters = new HashMap<String, Object>();

    String strLanguage = vars.getLanguage();
    String strBaseDesign = getBaseDesignPath(strLanguage);

    JasperReport subReportOutstandingPayment;
    JasperReport subReportOutstandingDeposit;
    JasperReport subReportUnreconciledBankStatementLines;
    try {
      subReportOutstandingPayment =
          Utility.getTranslatedJasperReport(
              this,
              strBaseDesign + "/org/openbravo/advpaymentmngt/ad_reports/OutstandingPayment.jrxml",
              vars.getLanguage(),
              strBaseDesign);

      subReportOutstandingDeposit =
          Utility.getTranslatedJasperReport(
              this,
              strBaseDesign + "/org/openbravo/advpaymentmngt/ad_reports/OutstandingDeposit.jrxml",
              vars.getLanguage(),
              strBaseDesign);

      subReportUnreconciledBankStatementLines =
          Utility.getTranslatedJasperReport(
              this,
              strBaseDesign
                  + "/org/openbravo/advpaymentmngt/ad_reports/UnreconciledBankStatement.jrxml",
              vars.getLanguage(),
              strBaseDesign);

    } catch (JRException e) {
      throw new ServletException(e.getMessage());
    }

    String dateFormat =
        OBPropertiesProvider.getInstance().getOpenbravoProperties().getProperty("dateFormat.java");
    SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
    List<BigDecimal> amtPayDep = getOutstandingPaymentAndDepositTotal(reconciliation);
    BigDecimal accountBalanceOB = getBalanceOfAccount(reconciliation);
    BigDecimal totalOutPayment = amtPayDep.get(0);
    BigDecimal totalOutDeposit = amtPayDep.get(1);
    BigDecimal totalUnreconciledBs = getUnreconciledBankStatmentLinesTotal(reconciliation);

    // Parameters
    parameters.put("REPORT_TYPE", reportType);

    // Common
    parameters.put("FINACCOUNT_INFO", strFinFinancialAccountName);
    parameters.put("DATEFORMAT", sdf);
    parameters.put("RECONCILIATION_ID", strFinReconciliationId);
    parameters.put("ACC_BAL_OB", accountBalanceOB);
    parameters.put(
        "ADJ_ACC_BAL_OB",
        accountBalanceOB.add(totalOutPayment).subtract(totalOutDeposit).add(totalUnreconciledBs));

    parameters.put("SHOW_BAND_PAYMENT", (totalOutPayment.compareTo(BigDecimal.ZERO) != 0));
    parameters.put("SHOW_BAND_DEPOSIT", (totalOutDeposit.compareTo(BigDecimal.ZERO) != 0));
    parameters.put("SHOW_BAND_BSLINE", (totalUnreconciledBs.compareTo(BigDecimal.ZERO) != 0));

    // Summary
    parameters.put("AMT_OUT_PAYMENT", totalOutPayment);
    parameters.put("AMT_OUT_DEPOSIT", totalOutDeposit);
    parameters.put("AMT_UNREC_BSLINE", totalUnreconciledBs);

    OBContext.setAdminMode(true);
    try {
      parameters.put("DATE", reconciliation.getEndingDate());
      parameters.put("END_BALANCE", reconciliation.getEndingBalance());
    } finally {
      OBContext.restorePreviousMode();
    }

    parameters.put("SUBREP_OUTPAYMENT", subReportOutstandingPayment);
    parameters.put("SUBREP_OUTDEPOSIT", subReportOutstandingDeposit);
    parameters.put("SUBREP_UNRECBS", subReportUnreconciledBankStatementLines);

    response.setContentType("text/html; charset=UTF-8");
    renderJR(vars, response, strMainReportName, "pdf", parameters, null, null);
  }