report-api : Create Excel and pdf - download

http://localhost:8080/swagger-ui/index.html

Any task analysis

  1. analysis start from the databases check any dropdown or prepopulated data

  2. For dynamic query use : Query by Element

EligibilityDtls eligibilityDtls = new EligibilityDtls();

    String planName = searchRequest.getPlanName();
    if (planName != null && !planName.equals("")) {
        eligibilityDtls.setPlanName(planName);
    }

    String planStatus = searchRequest.getPlanStatus();
    if (planStatus != null && !planStatus.equals("")) {
        eligibilityDtls.setPlanStatus(planStatus);
    }

    LocalDate planStartDate = searchRequest.getPlanStartDate();
    if (planStartDate != null) {
        eligibilityDtls.setPlanStartDate(planStartDate);
    }

Example example = Example.of(eligibilityDtls); List eligibilityDtlsList = eligibilityDtlsRepo.findAll(example);

  1. Dependency for excel
org.apache.poi poi-ooxml 5.2.3

Workbook => sheet => row => cell => cellvalue

  1. Dependency for pdf com.github.librepdf openpdf 1.3.30