nikitha Posted December 30, 2008 Share Posted December 30, 2008 Hi,I have a requirement to get the text "Unknown" when we get the null value for the field while displaying the records from database in detail section of jrxml templatePlease help me to move forward.Regards,Naveen Link to comment Share on other sites More sharing options...
kenclark Posted December 30, 2008 Share Posted December 30, 2008 I think you can do it basically like this: Create a static text element and set it to only print when the field is null using "Print When Expression". On your text field, set it to print blank when null. Put the two fields on top of each other. Good luck, ken Link to comment Share on other sites More sharing options...
hangman01 Posted December 30, 2008 Share Posted December 30, 2008 You can create a Java String variable which you can fill using $F{your_field}==null?"Unknown":$F{your_field} if your_field is not a String the toString() method can be used to make it a string. This will simplfy the report since you will not have text_fields stacked on top of other text fields. 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