jaapandre Posted February 10, 2011 Share Posted February 10, 2011 I have a problem with the hyphenation. As far as I understand jasper reports doesn't support hyphenation[*], but hopefully I'm wrong....my report contains a crosstab with (of course) fixed width of column. The column header text (eg) contains sometimes one word which needs more space than the column width. At this moment this is broken into for instance accountanc <newline> y, which is of course not correct/ugly.Is there a possibility to improve this?Jaap-Andre, quite desperate [*] see http://jasperforge.org/projects/jasperreports/tracker/view.php?id=2672 Link to comment Share on other sites More sharing options...
szaharia Posted February 14, 2011 Share Posted February 14, 2011 Hi,Side-effects of no-hyphenation are quite ugly sometimes. What can be done at the moment in JR: Choose a smaller font size Truncate the last word in the text, eventually using a customized text suffix (which generates, for instance, 'account...' instead of 'accountanc <newline> y') Available only for the Excel output: set the net.sf.jasperreports.export.xls.wrap.text property to false for that report element.Hope this helps,sanda Link to comment Share on other sites More sharing options...
jaapandre Posted February 14, 2011 Author Share Posted February 14, 2011 Hi Sanda, Thanks for your reaction. I already used/tried 1) and 2). But Excel could be (for now) a workaround. I hoped it was also possible for pdf. Itext (which I believe is used to generate the pdf) does support hyphenation, but it is/I am not (yet?) able to use is? Best regards, Jaap-Andre Link to comment Share on other sites More sharing options...
szaharia Posted February 14, 2011 Share Posted February 14, 2011 Hi Jaap-Andre,Something similar could be achieved in HTML too, using another property: net.sf.jasperreports.export.html.wrap.break.word.For PDF there is no such property at the moment. But if you consider this necessary, you could post a RFE here.Thank you,sanda Link to comment Share on other sites More sharing options...
jaapandre Posted February 14, 2011 Author Share Posted February 14, 2011 Hi Sanda, Thanks again. I guess the html.wrap.break.word-property is used to enter newlines between words, not for breaking within words, but I'll check it to be sure. The tracker already contains an issue (#2672) for hyphenation since 2006. I recently added my thoughts in the hope it gets attention. Best regards, Jaap-Andre Link to comment Share on other sites More sharing options...
szaharia Posted February 14, 2011 Share Posted February 14, 2011 Here is the property definition:http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.html.wrap.break.wordIf it's set to true, the line break will be forced, even in the middle of a word. If it's false, the line won't break until the entire word is printed out.Regards,sanda Post Edited by shertage at 02/14/2011 14:34 Link to comment Share on other sites More sharing options...
jaapandre Posted February 14, 2011 Author Share Posted February 14, 2011 Aha, seems like it gets broken just at the end of the 'box', just the same with the pdf.Guess the excel could be the best solution for now. Groet, Jaap-Andre 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