nithyanand11 Posted July 29, 2010 Share Posted July 29, 2010 In ireport, if am try to display a string like "1234567890-abcdefgh" in text box with width - "15", but its just showing"1234567890- " remaining "abcdefgh" was skipped and displayed in second line.. but i need to display like"1234567890-abcd" , just to display the string as much space available. please help which escaping method will be suitable tohandle this scenario. -thanks in advance Link to comment Share on other sites More sharing options...
lucianc Posted July 29, 2010 Share Posted July 29, 2010 See the net.sf.jasperreports.text.truncate.at.char property.HTH,Lucian Link to comment Share on other sites More sharing options...
nithyanand11 Posted July 30, 2010 Author Share Posted July 30, 2010 thank you, but still am having some issues. i gave "JRPrintText.getFullText($F{HOSTNAME})" in Text Fieldexpression.. i got Error:Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@136d4 net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The method getFullText() in the type JRPrintText is not applicable for the arguments (String) value = (java.lang.String)(JRPrintText.getFullText(((java.lang.String)field_MYTEXT.getValue()))); //$JR_EXPR_ID=28$ i saw many functions but it will very mush helpful to me if i got some examples or any sample implementation thanks Link to comment Share on other sites More sharing options...
lucianc Posted July 30, 2010 Share Posted July 30, 2010 Why would you use that expression for the text field? If you want to use the property that I pointed to, all you have to do is to set the property at report or element level as below.Regards,LucianCode:<jasperReport ...><property name="net.sf.jasperreports.text.truncate.at.char" value="true"/>...<textField> <reportElement> <property name="net.sf.jasperreports.text.truncate.at.char" value="true"/> </reportElement>... Link to comment Share on other sites More sharing options...
nithyanand11 Posted July 31, 2010 Author Share Posted July 31, 2010 ya now its workin pretty fine...thank you..thank you a lot.. Link to comment Share on other sites More sharing options...
nithyanand11 Posted September 3, 2010 Author Share Posted September 3, 2010 Could you tell me how to switch to a particular page by page number other than navigator 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