public void focusLostDate() {
   moFieldYear.setFieldValue(SLibTimeUtilities.digestYear(moFieldDateRef.getDate())[0]);
 }
  private void print() {
    int year = moFieldYear.getInteger();
    Cursor cursor = getCursor();
    Map<String, Object> map = null;
    JasperPrint jasperPrint = null;
    JasperViewer jasperViewer = null;
    SDataBizPartner bizPartner = null;
    SDataBizPartnerCategory bizPartnerCategory = null;

    try {
      setCursor(new Cursor(Cursor.WAIT_CURSOR));

      bizPartner =
          (SDataBizPartner)
              SDataUtilities.readRegistry(
                  miClient,
                  SDataConstants.BPSU_BP,
                  moFieldBizPartner.getKeyAsIntArray(),
                  SLibConstants.EXEC_MODE_VERBOSE);

      map = miClient.createReportParams();
      map.put("nSysMoveCatId", manSysMoveTypeKey[0]);
      map.put("nSysMoveTypeId", manSysMoveTypeKey[1]);
      map.put("sBizPartnerCat", msBizPartnerCatSng.toUpperCase());
      map.put("sBizPartnerCatPlural", msBizPartnerCatPlr.toUpperCase());
      map.put(
          "nLocalCurrencyId",
          miClient.getSessionXXX().getParamsErp().getDbmsDataCurrency().getPkCurrencyId());
      map.put(
          "sLocalCurrency",
          miClient.getSessionXXX().getParamsErp().getDbmsDataCurrency().getCurrency());
      map.put("nYear", year);
      map.put(
          "tDate",
          jckShowPayDays.isSelected()
              ? moFieldDateRef.getDate()
              : SLibTimeUtilities.createDate(year, 12, 31));
      map.put("nBizPartnerId", bizPartner.getPkBizPartnerId());
      map.put("sBizPartner", bizPartner.getBizPartner());

      switch (mnBizPartnerCategoryId) {
        case SDataConstantsSys.BPSS_CT_BP_SUP:
          bizPartnerCategory = bizPartner.getDbmsCategorySettingsSup();
          break;
        case SDataConstantsSys.BPSS_CT_BP_CUS:
          bizPartnerCategory = bizPartner.getDbmsCategorySettingsCus();
          break;
        default:
      }

      map.put("dCreditLimit", bizPartnerCategory.getEffectiveCreditLimit());
      map.put("nDaysCredit", bizPartnerCategory.getEffectiveDaysOfCredit());
      map.put("nDaysGrace", bizPartnerCategory.getEffectiveDaysOfGrace());
      map.put(
          "sCreditType",
          SDataReadDescriptions.getCatalogueDescription(
              miClient,
              SDataConstants.BPSS_TP_CRED,
              new int[] {bizPartnerCategory.getEffectiveCreditTypeId()}));

      jasperPrint =
          SDataUtilities.fillReport(
              miClient,
              jckShowPayDays.isSelected()
                  ? SDataConstantsSys.REP_FIN_BPS_ACC_MOV_DAY
                  : SDataConstantsSys.REP_FIN_BPS_ACC_MOV,
              map);
      jasperViewer = new JasperViewer(jasperPrint, false);
      jasperViewer.setTitle(getTitle());
      jasperViewer.setVisible(true);
    } catch (Exception e) {
      SLibUtilities.renderException(this, e);
    } finally {
      setCursor(cursor);
    }
  }