Jump to content
Changes to the Jaspersoft community edition download ×

hyphenation in crosstab textfield


jaapandre

Recommended Posts

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

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

Side-effects of no-hyphenation are quite ugly sometimes. What can be done at the moment in JR:

  1. Choose a smaller font size
  2. Truncate the last word in the text, eventually using a customized text suffix (which generates, for instance, 'account...' instead of 'accountanc <newline> y')
  3. 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

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

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

Here is the property definition:

http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.html.wrap.break.word

If 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...