#1 2015-12-17 14:36:17

Glandike
Member
Registered: 2015-11-10

UTF8 in jasper report

Hi.

My issue is to find out why Cyrillic characters doesn't display in html, PDF and preview tab then i use jasper reports. I tried all the ways described in this topic :

I changed default charset to UTF-8 in the /etc/main/main.cf
I edited the file persistence.xml and changed the jdbc url to <property name="hibernate.connection.url" value="jdbc:postgresql://192.168.94.16:5432/rsdev?useUnicode=true&amp;characterEncoding=utf8" />
Because ReportServer runs at CentOS, and there is no catalina files, i added in tomcat.conf to JAVA_OPTS key -Dfile.encoding=UTF8
At the end, i set font in jrxml file to DejaVu Sans and install this font at server, but still cyrillic characters doesn't display.

Could someone help me? I'm desperate.

Offline

#2 2015-12-21 16:56:23

Thorsten J. Krause
Guest

Re: UTF8 in jasper report

Hi,

you indeed already made sure it's none of the usual suspects. So we need to do some digging around to find the culprit. Can you please try this:

- Create a dynamic list for the same datasource your jasper report uses
- Create a jasper report with cyrillic characters in a static text

That should tell us if the problem is with the connection to the datasource or with the jasper report.

Cheers,
Thorsten

#3 2015-12-22 08:02:48

Glandike
Member
Registered: 2015-11-10

Re: UTF8 in jasper report

Thanks a lot for your reply!

That is jasper report problem for sure. I have been creating a lot dynamic lists upon my datasource and all they works well. And moreover, i created jasper report with with cyrillic characters in a static text and they does not display in PDF/preview.

Back to the question - I understood how to fix the problem with excel/html -- that's all about jar version of Apache POI. Then i replaced standart 3.9 version to 3.13 from official site, extract to excel and html in jasper report starts working.

I can attach all required files/logs/etc. whatever you need.

A lot hope for the your response.

One more question. Is it possible to change standart preview type? For example, now it's PDF by default, but i want to set default as HTML.

Last edited by Glandike (2015-12-23 11:39:23)

Offline

#4 2015-12-28 17:25:51

Thorsten J. Krause
Guest

Re: UTF8 in jasper report

Hi Glandike,

the next I would have checked is if the report got uploaded correctly (by using the jrxml download and making sure the file was not corrupted).
But if this only affects the pdf export while the htmlexport for the same report is fine, this can not be the cause.

My guess would still be a font problem. You said you are already using Dejavu Sans. In my test this worked fine with cyrillic characters, so I'm not sure what else could be wrong. Did you try installing the font on the server? We already have dejavu sans bundled with ReportServer, but there isn't much else I can think of.

Cheers,
Thorsten

#5 2024-11-25 08:05:38

ttminh
Member
Registered: 2024-11-25

Re: UTF8 in jasper report

I have same problem with Cyrillic characters when execute Jasper report in ReportServer, data from datasource is ok but static text from report Cyrillic is '?' characters, can some one help ?

Offline

#6 2024-11-25 11:12:02

eduardo
Administrator
Registered: 2016-11-01
Website

Re: UTF8 in jasper report

Hi ttminh,

is this the same problem you described here? https://forum.reportserver.net/viewtopi … 508#p11508

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB