rodrigo_43 Posted April 26, 2019 Share Posted April 26, 2019 Hi all, I am writing reports right now with Jaspersoft Studio and have the following issue:I need to do a Summary at the bottom of report which shall include FIRST and LAST row's specific field, but only when that row meets specific criteria.This is what i've done so far: My variable $V{OPENING_CASH} should bring the opening balance amount of the first row which has "Bonus" as account_type, I've set the expression to the following: $F{account_type}.equals("Bonus") ? $F{opening_balance} : null , but this brings null if condition is not met in first row(as expected lol) what I need is to bring the first row which is not actually null, but I don't know how to actually do this. Any ideas? Thanks in advance Link to comment Share on other sites More sharing options...
hozawa Posted April 27, 2019 Share Posted April 27, 2019 Have you tried seting the variable as below:Name: OPENING_CASHValue Class Name: java.lang.StringCalculation: No Calculation FunctionExpression:($V{OPENING_CASH}== null && $F{opening_balance} != null) ? $F{opening_balance} : $V{OPENING_CASH}Reset type: Report Link to comment Share on other sites More sharing options...
rodrigo_43 Posted April 28, 2019 Author Share Posted April 28, 2019 @hozawa I saw what you did there, doesn't filter by criteria but i totally got what you are trying to do. I will try that on monday... Thanks a lot !! 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