Report on IREPORT - STATUS

-3

Good morning, I need to change a report in IREPORT that now works asim:

Currently the field works like this:

    (Boolean)
    $F{documentoVigente} ? "VIGENTE" : "VENCIDO"

I have a text called $ F {documentOpen} passing an expression class (java String)

I need my report to be generated like this today:

        if $F{dataVencimento} = $F{CurrentDate} : "VIGENTE"
        if else $F{dataVencimento} < $F{CurrentDate} : "VENCIDO"
        else : "VENCENDO" > a data do dia 

I have a class that references this report:

public  class  RepDtoReport  implement Serizable {

private String nomeRepresentante;
private Integer cartaoAssinatura;
private String descricaoGrupo;
private String codigoPessoa;
private String descricaoCargo;
private String descricaoDocumento;
private Date dataAtualizacao;

private  Date   dataVencimento;

private boolean documentoVigente;


}getts e setters}

public boolean is documentoVigente() {
return documentoVigente;
}

public void setDocumentoVigente (final boolean documentoVigente){
this.documentoVigente = documentoVigente;
}

public  Date getDataVencimento() {
return dataVencimento;
}

public void setDocumentoVigente (final Date dataVencimento ){
this.dataVencimento = dataVencimento;
}

Today it looks like this:

Can I just do it on ireport?

    
asked by anonymous 26.09.2018 / 14:32

1 answer

0

I have a practice that I really enjoy using. In reporting, I like to separate data processing for the database and IO for the application. Thinking in this direction, when you make a query in the database and bring an N of records, when you offer this to the application layer it needs to iterate through each of the records to apply the rule.

Example: A query that returns 100 records ends up processing the same 100 to get the desired result by applying the reporting rules.

My tip for you is to analyze the feasibility of using a VIEW already with all the rules necessary for your report. Obviously untying the rules of the application has its onus and bonuses, however there is a huge gain in processing which can be an advantage, not to mention the ease of implementation in any Report tool.

    
28.09.2018 / 17:15