foster Posted August 24, 2011 Share Posted August 24, 2011 Hi.I have string variable. In variable expression i have code below.but this variable still returning null.Pls. help. Thx.Code:("PôžiÄka_M1_L".equals($F{actypnazov})||"PôžiÄka_N1_L".equals($F{actypnazov})||"M1_99_L".equals($F{actypnazov})||"N1_99_L".equals($F{actypnazov}))?"1":"0" Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted August 25, 2011 Share Posted August 25, 2011 What calculation type did you set for the variable?What values do you expect the variable to assume?Where are you printing the variable? Giulio Link to comment Share on other sites More sharing options...
foster Posted August 25, 2011 Author Share Posted August 25, 2011 calculation type - nonevalues - string 1 if condition is true, 0 if condition is falseI use this variable in report in detail - in textfield.But I didn't anything and condition started work properly.Can it be because I set one textfield to be generated with parameter "report"? Post Edited by foster at 08/25/2011 10:45 Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted August 25, 2011 Share Posted August 25, 2011 I noticed that too, but I was not sure if it was just a typo in the message, you would have get at least a compilation error.Giulio Link to comment Share on other sites More sharing options...
foster Posted August 25, 2011 Author Share Posted August 25, 2011 No comp. error I had.Edited my first answer. So maybe problem was in time when this variable is generated. Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted August 25, 2011 Share Posted August 25, 2011 hm, I assume this may happen when using Groovy as expressions language (which is by the way what I recommend) Giulio Link to comment Share on other sites More sharing options...
foster Posted August 25, 2011 Author Share Posted August 25, 2011 I'm using ireport 2.5.I don't know what is Groovy. 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