Jump to content
Changes to the Jaspersoft community edition download ×

Problems, null or zero


ktrinad

Recommended Posts

By: Evguen Rosada - evguen

Problems, null or zero

2003-06-09 11:27

Hi,

 

I have a problem.

When I show my TextField with the following statement(between "):

"

(

(

($V{REL_SALDOINICIALESTADO}.doubleValue())

+

($V{REL_ENTRADAS_ESTADO}.doubleValue())

+

($V{REL_ENTRADAS_OP}.doubleValue())

)

-

(

(((Double)$P{P_ST_HASHVALORES}.get("CS_TOT_DEST_ESTADO")).doubleValue())

+

(((Double)$P{P_ST_HASHVALORES}.get("CS_TOT_DEST_OP")).doubleValue())

+

(((Double)$P{P_ST_HASHVALORES}.get("CS_TOT_BX_APLICACAO")).doubleValue())

)

)

"

and one of the parameters value "$P{P_ST_HASHVALORES}" is null, then the TextField return a null Double(the field type is Double). But I would like to return 0(zero) when the return of this statement was null.

How Can I do that?

Thanks in advance.

 

 

 

 

By: Giulio Toffoli - gt78

RE: Problems, null or zero

2003-06-09 17:03

Use your statement as expression for a new variable and then make the null test in the field....

 

new Double( ($V{MyNewVar} == null) ? 0.0 : $V{MyNewVar}.doubleValue())

 

Giulio

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...