rajuchacha007 Posted August 12, 2010 Share Posted August 12, 2010 Experts, It would be a great help if you please do let me know how to use trim() in the expression so as to remove whitespaces? At present, I am joining two fields using expression, ($F{PROJECT_CODE}+" ("+$P{PROCESS_TYPE}+")"). It's producing some white space in the pdf file affecting the alignment of the report. I thought of trim() method to so as to delete white space? Is it the right way or any method exists? please do let me know. Many thanks in advance. Best regards. Link to comment Share on other sites More sharing options...
wdn Posted August 12, 2010 Share Posted August 12, 2010 trim() delete spaces in front and at the back of a variable so I would expect it to be... ($F{PROJECT_CODE}.trim()+" ("+$P{PROCESS_TYPE}.trim()+")") Link to comment Share on other sites More sharing options...
robsil Posted August 12, 2010 Share Posted August 12, 2010 wdn is correct. The $F{PROJECT_CODE} field should be thought of as a Java Object, with type being whatever type you've specified in declaring the field (String,Integer, Boolean, etc.). Just compare the type declared in the Java API and call the appropriate methods you want that way.Post Edited by robsil at 08/12/2010 19:42 Link to comment Share on other sites More sharing options...
rajuchacha007 Posted August 13, 2010 Author Share Posted August 13, 2010 @wdn, @robsil Thank you very much for your reply. I really appreciate. I will see how it works now.Best regards. Link to comment Share on other sites More sharing options...
meeedda Posted January 26, 2011 Share Posted January 26, 2011 Hi,I can't see one feedback for the formula bellow.Thank you, 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