oskr.mipe Posted March 3, 2015 Share Posted March 3, 2015 I want create a sum variable what when any value is null return nullEX: 101526null16null----Total : null Link to comment Share on other sites More sharing options...
hozawa Posted March 4, 2015 Share Posted March 4, 2015 I think I saw a solution to your problem in Studio User Guide. I think it just involved doing a null check and returning 0 for a value when null. Link to comment Share on other sites More sharing options...
oskr.mipe Posted March 4, 2015 Author Share Posted March 4, 2015 I dont want 0, I want null and actually I recived the sum of the not-null values... like say the documentation. Link to comment Share on other sites More sharing options...
AnnMary.Thomas Posted March 9, 2015 Share Posted March 9, 2015 Define a Variable var1 with type Integer. Set the Conditional operator expression as $F{field1} == null ? null : SUM($F{field1}).Drag this variable in your sum. Hope this helps Link to comment Share on other sites More sharing options...
oskr.mipe Posted March 9, 2015 Author Share Posted March 9, 2015 SOLVEDI solved setinginitial value = BigDecimal.ZEROcalcultion = NOTINGvariable expresion = ($F{costo}!= null && $V{costo} != null) ? $V{costo}.add($F{costo}) : null 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