ktrinad Posted August 31, 2006 Share Posted August 31, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now