2002 JI Open Discussion Posted August 19, 2006 Share Posted August 19, 2006 By: Mike - liang_mike Problem with <variableExpression> 2003-10-29 12:47 I have a variable and I want to increment it if the field, which is called "PaymentMethod", is equal to "PAC". <field name="PaymentMethod" class="java.lang.String"/> ...................... <variable name="numPACContracts" class="java.lang.Integer" resetType="Group" resetGroup="ByGroup" calculation="System"> <variableExpression>($F{PaymentMethod}.equals("PAC"))?(new Integer($V{numPACContracts}.intValue() + 1)):($V{numPACContracts})</variableExpression> <initialValueExpression>new Integer(0)</initialValueExpression> </variable> However, numPACContracts is always 0. I am pretty sure there is "PAC" in the datasource, so it shouldn't be the datasource's problem. Anyone have any idea why it is always the initial value? I also have tried ($F{PaymentMethod}=="PAC"), but still doesn't work Thank you 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