hondaman900 Posted August 6, 2018 Share Posted August 6, 2018 I have subreports that return and display values in variables in the main report. I have a third variable that subtracts one variable from the other to give a result, but it always gives "null". I have tried all permutations of evaluation time for each variables, and can get the results from the subreports to display no problem but always get null when doing math on them.My subreports and variables are all in the summary band. The variable doing the math expression is the last item.The expression that always gives "null" is: $V{mon_total}.subtract($V{liabilities_totals})[/code]where $V{mon_total}[/code]and $V{liabilities_totals}[/code]are the variables that get and display the return values from thre sub reports. Any suggestions where to look next for a solution....? Link to comment Share on other sites More sharing options...
hondaman900 Posted November 3, 2020 Author Share Posted November 3, 2020 Anyone...? I know it's been a long time, but my work on this project brings me back to the same issue. The source is `` <variable name="mon_total" class="java.math.BigDecimal"/> <variable name="liabilities_totals" class="java.math.BigDecimal"/> <variable name="net_worth" class="java.math.BigDecimal" resetType="Page" calculation="Sum"> <variableExpression><![CDATA[$V{mon_total}.subtract($V{liabilities_totals})]]></variableExpression> </variable>``I can't figure out why this doesn't work?? Any suggestions??? 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