ireport records

1. Only STSong-Light is available under the PDF Font name, and effects such as bold and italics are invalid in pdf.

 

2. To display Chinese correctly, the key is two points, one is the correct encoding method, and the other is the available fonts.

So in ireport, PDF Encoding should be set to UniGB-UCS2-H (Chinese Simplified). If this encoding method is used, the Asian language package iTextAsian.jar must be included in the classpath.
Secondly, to set the PDF Font Name to STSong-Light, this package is also required. But there will be a problem here, that is, if bold or italic is set in ireport, it will not be reflected in the generated PDF. This is because the above fonts can only display ordinary Chinese fonts, and bold fonts need corresponding bold Chinese fonts, which are not given in iTextAsian.
This setting can display Chinese reports normally. The above is limited to the display in PDF. There is no such problem in HTML or XLS, as long as the encoding method is correct.
 
3. The font selection of the Font tab in the text box is a complete set to display correctly:
[1] Font Name: select Song Dynasty
PDF Font Name: Select STSong-Light
Final PDF Encoding: Select UniGB-UCS2-H (Chinese Simplified)
[2] Quoting external fonts such as official script
Put the font file in the fonts folder of the iReport installation directory, such as official script [D:\iReport -3.0.0\fonts\SIMLI.TTF]
Font Name: choose official script
 
PDF Font Name: Select the external font file Lishu (SIMLI.TTF)
Finally PDF Encoding: select Identity-H (Unicode with horizontal writing) [select it for external files]
 
4. If there is no data: the meanings of several options in the following drop-down menu are:
No pages [no pages are displayed when there is no data in Detail]
Blank page [a blank page appears when there is no data in the Detail]
All sections, no detail [When there is no data in Detail, something other than detail will be displayed]
No-date section [] I don't know for now
 
5. .Set dynamic properties
1. Right click style-->Add-->style
2. Select the current style and change its properties in the properties panel
name: the name of the style
default style: Whether the default style, if selected, this style will be used as the default style. If the element on the interface is not set with attributes and the style attribute is not set to other styles , the attributes of the element will be set according to the default style by default. When multiple styles exist, only one default style can be used.
opaque: Set the transparency.
Other properties are the same as setting the field properties.
3. Right-click the current style-->Add conditional style
4. Select the newly created conditional style and change its properties in the properties panel
condition expression  : Set the condition for the "work" of the conditional style. This attribute is the most important. The other attributes are the same as the attributes for setting the style.
For example, whether to apply the current conditional style according to the row_level (level) setting:
condition expression 的值:new Boolean($F{row_level}==1)或  $F{row_level}==1?new Boolean(true) :new Boolean(false)
JDK1.5 and above can also be written like this: $F{row_level}==1 or $F{row_level}==1?true:false

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326991306&siteId=291194637