-3
Good morning , I need to change a report in IREPORT that works today as well:
Currently the field works like this:
(Boolean)
$F{documentoVigente} ? "VIGENTE" : "VENCIDO"
I have a text called $F{documentVigent} 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;
}
I can only do it in the ireport ?
This is the best way to make this kind of comparison, I believe your field documentVigent is coming with a false or null value. He’s the Boolean type, right?
– Adriano Gomes
He is the type Boolean, in case I needed to put another value as it would be?
– Bruno S
ai vc does the nested tender operation, example $F{myCondication1} ? " myresult" : $F{myCondication2} ? " my_results2" : "my_other_results2"
– Adriano Gomes
Okay, I have a Boolean condition and I need that same field to be adding the value On day for example, create one more as Boolean? and he will compare the 3 and bring the one I need?
– Bruno S