/**
   * This method constructs the canned report VO.
   *
   * @param report8020GenericCategoryFormattingSelectionForm the report8020formatting selection form
   * @return report8020GenericCategoryVO
   * @throws SMORAException the SMORA exception
   */
  private static FiscalYTDFormattingVO constructCannedReportVO(
      FiscalYTDFormattingSelectionForm fiscalYTDFormattingSelectionForm) throws SMORAException {
    if (fiscalYTDFormattingVO == null) {
      fiscalYTDFormattingVO = new FiscalYTDFormattingVO();
    }

    fiscalYTDFormattingVO.setAccountFormat(fiscalYTDFormattingSelectionForm.getAccountFormat());
    fiscalYTDFormattingVO.setFiscalYearStartMonth(
        fiscalYTDFormattingSelectionForm.getFiscalYearStartMonth());
    fiscalYTDFormattingVO.setLimitFirstRows(fiscalYTDFormattingSelectionForm.getLimitFirstRows());
    fiscalYTDFormattingVO.setSortOptions(fiscalYTDFormattingSelectionForm.getSortOptions());

    return fiscalYTDFormattingVO;
  }
  /**
   * This method populates the report base VO.
   *
   * @param customReportingForm the custom reporting form
   * @return the report base VO
   * @throws SMORAException the SMORA exception
   */
  public static ReportBaseVO populateFiscalYTDReportBaseVO(FiscalYTDForm fiscalYTDForm)
      throws SMORAException {
    fiscalYTDVO = new FiscalYTDVO();
    criteriaVO = new CriteriaVO();

    FiscalYTDFormattingSelectionForm fiscalYTDFormattingSelectionForm =
        fiscalYTDForm.getFormattingSelectionForm();
    DateSelectionForm dateSelectionForm = fiscalYTDForm.getDateSelectionForm();
    CustomerSelectionForm customerSelectionForm = fiscalYTDForm.getCustomerSelectionForm();
    SupplierSelectionForm supplierSelectionForm = fiscalYTDForm.getSupplierSelectionForm();
    ItemSelectionForm itemSelectionForm = fiscalYTDForm.getItemSelectionForm();
    AdvancedFiltersForm advancedFiltersForm = fiscalYTDForm.getAdvancedFiltersForm();

    ReportBaseVO baseVO = new ReportBaseVO();
    CannedReportVO cannedReportVO = new CannedReportVO();
    CannedReportCriteriaVO cannedReportCriteriaVO = new CannedReportCriteriaVO();

    // QC-10063 - Set Template Name in xml to display template name in Save to My Reports box
    if (fiscalYTDFormattingSelectionForm.getTemplate_Name() != null) {
      baseVO.setTemplateName(fiscalYTDFormattingSelectionForm.getTemplate_Name());
    } else {
      baseVO.setTemplateName("");
    }
    baseVO.setCustomHeading(fiscalYTDFormattingSelectionForm.getCustomHeading());
    baseVO.setHtml(fiscalYTDFormattingSelectionForm.isResultsDisplayHTML());
    baseVO.setPdf(fiscalYTDFormattingSelectionForm.isResultsDisplayPDF());
    baseVO.setXls(fiscalYTDFormattingSelectionForm.isResultsDisplayXLS());
    baseVO.setCsv(fiscalYTDFormattingSelectionForm.isResultsDisplayCSV());
    baseVO.setReportType("CANNED_REPORT");
    baseVO.setReportSubtype(ReportManagerConstants.REPORT_FISCAL_YTD);
    baseVO.setReportGroupID(ReportManagerConstants.REPORT_FISCAL_YTD);

    fiscalYTDFormattingVO = constructCannedReportVO(fiscalYTDFormattingSelectionForm);
    fiscalYTDVO.setFiscalYTDFormattingVO(fiscalYTDFormattingVO);
    dateSelectionAndComparisonVO = constructCannedReportVO(dateSelectionForm);

    criteriaVO = constructCannedReportVO(customerSelectionForm);
    criteriaVO = constructCannedReportVO(supplierSelectionForm);
    criteriaVO = constructCannedReportVO(itemSelectionForm);
    criteriaVO = constructCannedReportVO(advancedFiltersForm);
    criteriaVO.setDateSelectionAndComparisonVO(dateSelectionAndComparisonVO);
    cannedReportCriteriaVO.setCriteriaVO(criteriaVO);

    cannedReportVO.setFiscalYTDVO(fiscalYTDVO);
    cannedReportVO.setCannedReportCriteriaVO(cannedReportCriteriaVO);
    cannedReportVO.setCannedReportTitle("25");
    baseVO.setRowLimits(ReportManagerConstants.CANNED_REPORT_ROW_LIMITS);
    baseVO.setCannedReportVO(cannedReportVO);

    return baseVO;
  }