jaypersanchez_1 Posted May 25, 2015 Share Posted May 25, 2015 I need to evaluate a value that I am taking from a Map in ireport. I know that I am retrieving the correct value from within the report. However, I also need to keep track of a number of items per value. For example, I need to keep track of the number of values I get from the Map with values "P"; then I need to keep track on the number of values that are not equals to "P". I am confident that the correct values are being retrieved from the Map and printed on the reports for the correct row. However, in the summar, I have setup the following variables: nonPValues, PValues. This is how I am trying to retrieve and evaluate the value:for keeping count of PValues: ( (String)$P{myMap}.get( $F{myObject}.getObjectValue()) ).equals("P") ? new Integer(1) : new Integer(0)for keeping count of nonPValues: !( (String)$P{myMap}.get( $F{myObject}.getObjectValue()) ).equals("P") ? new Integer(1) : new Integer(0)However, when I display the values for each variables, it does not seem to be evaluating correctly. When there are values like "Q" and "H", the PValues gets incremented. I even entered a bogus value that I know does not exist, yet it increments it still. What am I missing? Thanks for any help. 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