简体   繁体   English

jasper 报告不显示日文报告

[英]jasper reports does not display report in Japanese

I have a problem regarding the jasper reports.我有一个关于碧玉报告的问题。 I have already an application that will generate a report using jasper reports.我已经有一个应用程序可以使用 jasper 报告生成报告。 It does fine when my PC's Region and Language setting, the Format is not in Japanese even though the characters are in Japanese.当我的 PC 的区域和语言设置很好时,即使字符是日语,格式也不是日语。 But when I change my Format to Japanese, there comes the problem.但是当我将格式更改为日语时,问题就出现了。 It will generate a report thou but there is no display.它会生成一个报告,但没有显示。 We can tell that it can't generate a report because a message will appear saying "The Document has no page".我们可以说它无法生成报告,因为会出现一条消息,说“文档没有页面”。 Does this have something to do with the encoding or fonts?这与编码或字体有关吗?

The Japanese characters were also not displayed in the PDF that was generated.日语字符也未显示在生成的 PDF 中。

检查您的 .jrxml 报告文件是否有此标题;

   <?xml version="1.0" encoding="UTF-8"?> 

So i was able to solve my problem with the help of the above answers.所以我能够在上述答案的帮助下解决我的问题。 What I did was, I updated my jasperreports.jar and iText.. Also, i've added itextasian.jar and jasperreports-font.jar (with the help above).我所做的是,我更新了我的 jasperreports.jar 和 iText.. 另外,我已经添加了 itextasian.jar 和 jasperreports-font.jar(在上面的帮助下)。 In my jrxml files, i've changed fonts and encoding to:在我的 jrxml 文件中,我已将字体和编码更改为:

                pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM