Jump to content
We've recently updated our Privacy Statement, available here ×

How to use If condition in my report?


DarknessTAOH

Recommended Posts

I have an expression value that returns a quantity, within those quantities it can be a ZERO, what I want is that when $V{carritoreceibos_vR_1} is equal to zero, multiply certain values ​​to zero.

 

example:

$V{carritoreceibos_vR_1}==0{

Double.valueOf($F{usuariosservicio_recibosVencidos})*0

}else{

Double.valueOf($F{usuariosservicio_recargoAgua}) * Double.valueOf($F{usuariosservicio_recibosVencidos})

}

Sorry for the inconvenience but I don't know English.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Simply put, I think it can be described by a ternary operator.

$V{carritoreceibos_vR_1}==0?0:$V{carritoreceibos_vR_1}*$F{usuariosservicio_recibosVencidos}[/code]

But your requirement is to change the value of 'usuariosservicio_recibosVencidos' itself?
If so, it must be written in the SQL for data retrieval.
However, I don't think we can use $V{carritoreceibos_vR_1} within the SQL.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...