slsolomon Posted June 23, 2011 Share Posted June 23, 2011 Hello,I have a field, $F{TRANSFER_DATE} defined as BigDecimal. The value in my database row is 1339381600. When I insert the field in my report, it displays correctly.I also have a variable transferDateBigDecimal, also defined as BigDecimal, whose variable expression is defined as $F{TRANSFER_DATE}. When I insert the variable $V{transferDateBigDecimal} in my report, it displays as null.The report language is Groovy. Using iReport 3.7.5. Database is H2 in server mode.Any ideas?Thanks Link to comment Share on other sites More sharing options...
augarte Posted June 23, 2011 Share Posted June 23, 2011 Hi, I don't know why is not showing the value of your field but why are you creating a variable that has the same value as the field? The aim of variables is to do some calculation with your fields but if you want to show the value of the field itself, just add the field in the report. I really don't understand what are you trying to do. Regards. Link to comment Share on other sites More sharing options...
slsolomon Posted June 23, 2011 Author Share Posted June 23, 2011 Well, yes, I am ultimately trying to do some processing on the field, in this case, convert it to Long, multiply by 1000L, then convert it to Date. I found that this processing resulted in null, so I did something very simple: simply set the value of the variable to the field. And the variable is still null.So the problem remains: a variable whose value is a BigDecimal field is null. Again, using iReport 3.7.5 and H2.I went back to my database and modified the table so that the field value is Long, and now I can successfully convert it to a Date object. So I believe the problem with BigDecimal is an iReport bug. 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