转 ireport解决中文乱码问题

初次使用ireport5.6生成的报表显示中文乱码: 原因:缺少亚洲语言包" iTextAsian.jar,"。 解决办法: 1.将亚洲语言包" iTextAsian.jar,"复制到iReport安装目录下的JasperSoft/iReport-5.6/ireport/libs下; 2.将iTextAsian.jar添加到iReport的classpath中,在iReport中选择”工具----》选项”菜单,点击出现如下界面,在Classpath中增加JAR包(iTextAsian.jar)即可。如图



 

3.设置报表上各显示对象的相关属性,各属性设置说明如下:
    Font        name:    宋体 (中文字体)
    PDF font name:   STSong-Light
    PDF  Encoding:  UniGB-UCS2-H(Chinese Siplified)
    PDF   Embeded: √

如图:



  

猜你喜欢

转载自zhyp29.iteye.com/blog/2353280
今日推荐