PDA

View Full Version : Run time label problem



Anonymous
06-27-2002, 10:04 AM
hi all,

Am taking a text area as the label for my report in run time, now the problem is while report generation that label is showing in a single line and there is also showing junk character.My guess is that the junk character is the enter key used in the text area.So please give some remedy for the said problem.

thanks in advance
sandeep

Anonymous
06-28-2002, 02:52 AM
Hi,

I'll have a look at this.

Have more fun,
said Thomas

Anonymous
07-01-2002, 05:44 PM
Hi,

you are right with your guess. When your label is a singleline element, no text transformation is done, only when your element contains more than one text line, the text is processed by and StringReader's readLine function to split the lines.

For mor information on when a line is considered multilined, see the message

http://www.object-refinery.com/phorum-3.3.2a/read.php?f=7&i=260&t=256#reply_260

in a previous thread.

Other non-printable characters are not treated special, it is up to you (the developer) to feed correct data into the report engine.

Note to everybody who is reading this: This behaviour applies also to unicode characters in the text as well as other potentially non-printable characters. It is up to you to transform the given text into a suitable form for printing. Printing special characters depends on the fonts capabilities to cope with certain Unicode characters. Most windows fonts do not implement all Unicode glyphs, unprintable chars are printed as "junk character", mostly a empty rectangle.

To test whether a font is able to display all characters of an given string, one can use the java.awt.Font.canDisplayUpTo(String) function. If the String is completly printable, the function returns -1.

Have more fun,
said Thomas