13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fonts and StylesFigure 8-10The new font family available in the Fonts combo boxBy clicking Export as extension, it is possible to export one or more font families and create UR extensionsautomatically (in the form of a JAR that must be added to the classpath of your application).If you already have a font extension, you can install it by adding the JAR to the <strong>iReport</strong> classpath.8.4 Character EncodingCorrect character encoding is crucial in UR, particularly when you have to print in PDF format. Therefore, it is veryimportant to choose the right PDF encoding. The encoding specifies how characters are to be interpreted. In Italian, forexample, to print correctly accented characters (such as è, ò, a, and ù), you must use CP1252 encoding (Western EuropeanANSI, also known as WinAnsi). <strong>iReport</strong> provides an extensive set of pre-defined encoding types in the PDF Encoding combobox in the Font tab of the element properties window.If you have problems with reports containing non-standard characters in PDF format, make sure that all the fields have thesame encoding type and check the charset used by the database from which the report data is read.8.5 Use of Unicode CharactersYou can use Unicode syntax to write non-Latin-based characters (such as Greek, Cyrillic, and Asian characters). For thesecharacters, specify the Unicode code in the expression that identifies the field text. For example, to print the Euro symbol, usethe Unicode \u20ac character escape.The expression \u20ac is not simple text; it is a Java expression that identifies a string containing the € character. Ifyou write this text into a static text element, “\u20ac” will appear; the value of a static field is not interpreted as a Java(or other language) expression (this only happens with the textfields where the context is provided using anexpression).8.6 Working with StylesThe Report Inspector displays the available styles in the outline view, in the node labeled Styles. To create a new style, rightclickthe Styles node and select Add style from the contextual menu (see Figure 8-11).131

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!