nitin403 Posted November 30, 2007 Share Posted November 30, 2007 Hi, All.I have a text field called "ProjectAmount", which holds a String value. I want the total of this field in the column footer. So created a variable called "TotalPro".the expression isnew BigDecimal($F{ProjectAmount})This works fine.But if ProjectAmount is "" or null the report fails. In this report if such a condition comes then it should ignore this, and continue with rest of the report.I was not able to formulate the correct equation. Thanks for your help in advance. Link to comment Share on other sites More sharing options...
martynhiemstra Posted November 30, 2007 Share Posted November 30, 2007 Set the expression to Code:($F{ProjectAmount} != null && !"".equals($F{ProjectAmount}) ? new BigDecimal($F{ProjectAmount}) : new BigDecimal(0) Post edited by: martynhiemstra, at: 2007/11/30 07:00 Link to comment Share on other sites More sharing options...
nitin403 Posted November 30, 2007 Author Share Posted November 30, 2007 Thanks a lot it worked out perfectly.Thanks martynhiemstra. 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