You are not logged in.
Pages: 1
Topic closed
Hi,
It is not outputting correct fonts when executing BIRT report. Instead of them I see: "?" - question marks.
When I am executing report directly from BIRT designer - everything outputting OK, but when from ReportServer - no.
In my case the fonts used in BIRT report - are Cyrillic (but they can be any other non-English in the future).
As I understand I need somehow to configure TOMCAT server used in ReportServer.
I found some methods e.g.:
http://siamblog2013.blogspot.com/2014/0 … n-for.html
http://dmitrygusev.blogspot.com/2011/09 … omcat.html
http://developer.actuate.com/community/ … ntsconfig/
,but I am not sure that they applicable exactly to ReportServer.
I am using: BIRT designer version: 4.4.0
ReportServer version: 2.1
Thanks in advance.
Last edited by Diver (2014-07-01 07:58:19)
Offline
Hi Diver,
did you check if the database used by ReportServer is configured for UTF-8? Missing fonts might also be an issue, but I would first make sure, the rptdocument files in the database are sound. Birt report documents are stored in the table RS_BIRT_REPORT_FILE. If you need help accessing the database please let me know what database you are using and if you installed ReportServer manualy, as per the install guide, or used the windows installer.
Cheers,
Thorsten
Hi, Thorsten
Yes, ReportServer database collation is: utf8 - default collation. It is MySQL.
I installed ReportServer like this:
Manually created mysql database (utf8 - default collation) for report server: as per the install guide. Executed sql script reportserver-RS2.1.6-5543-schema-MySQL5_CREATE.sql from ddl folder.
Because I didn't want to use Postgre which is suggested by default.
After executed windows installer and during installation choose "use existing database".
What I dont understand after comparing 2 files:
fontsConfig.xml in BIRT plugins directory
and
fontsConfig.xml from org.eclipse.birt.runtime-4.3.1 .jar in ReportServer,
they are completely identical. So both files use the same path to fonts folder (I suppose in my case it is c:\ Windows\Fonts), but Birt viewer shows fonts correctly, ReportServer -no.
P.S. My Data source used in report is also MySQL (utf8 - default collation).
Diver.
Last edited by Diver (2014-07-02 08:48:39)
Offline
Hi Diver,
unfortunately with mysql, just creating the database as utf8 is not enough. You also need to make sure, that the connection is established as utf8.
On way to archive this, is to set the
character-set-server=utf8
and collation-server=utf8_bin
options in your my.cnf (or using the mysql workbench)
If you don't want to reconfigre you database server, you can also set those options with the client (ReportServer):
Edit the file persistence.xml (in the WEB-INF/classes/META-INF directory) and change the jdbc url.
To force the client to use unicode append ?useUnicode=true&characterEncoding=utf8 to the url. Note that the & needs to be escaped as &
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/reportserver?useUnicode=true&characterEncoding=utf8"/>
After these changes restart mysql (if you changed the server settings) and reportserver and upload your reports again.
Cheers
Thorsten
Edit the file persistence.xml (in the WEB-INF/classes/META-INF directory) and change the jdbc url.
To force the client to use unicode append ?useUnicode=true&characterEncoding=utf8 to the url. Note that the & needs to be escaped as &<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/reportserver?useUnicode=true&characterEncoding=utf8"/>
After these changes restart mysql (if you changed the server settings) and reportserver and upload your reports again.
Thanks, these approach helped... it is now working in formats: Preview, PDF, WORD, EXCEL,
but unfortunately not in HTML format... In HTML format still continue outputting : "?" - question marks
Diver
Offline
Okay, one more config file to change:
In ReportServers Admin Module, click on Fileserver and locate the file /etc/main/main.cf
Change the default charset form ISO-8859-1 to UTF-8 and restart ReportServer.
Cheers,
Thorsten
Thanks, Thorsten
It is working now!!!
Diver
Offline
I have similar problem with fonts in pdf export files from Dynamic List and Jasper reports.
Data source is the same, report layout more or less the same.
In Dynamic List:
In Preview: OK
Excel export:OK
pdf: no foreign characters - characters are just cut out
html and csv: OK
In Jasper report:
In Preview: no foreign characters (characters are cut out)
Excel export: OK
Plain Excel export: OK
html: OK
RTF: OK
pdf: no foreign characters
I use posgreSQL as reportserver database, encoding UTF8
The data source is conneced with UTF8 encoding
and I changed encoding in main.cf to UTF-8
Karolina
Offline
Hi Karolina,
lets start of by looking at the jasper reports: Are the missing characters just in the data or also in static texts?
One setting you should also verify is the file.encoding system property. Depending on your configuration this can be set in
* Tomcat Manager
* catalina.bat/sh
* setenv.bat/sh
and should look like this
-Dfile.encoding=UTF8
If this doesn't soulve your issue please tell me a little bit more about your environment e.g. operating system, java version and if you installed manually or used the windows installer. Also: Is the report data in the same postgres database as reportserver or is this a seperate database (and what product, if different)
Cheers,
Thorsten
Hi Thorsten
this is my setenv.sh file:
export JAVA_OPTS="-server -Xms128xm -Xmx2048m"
export JAVA_OPTS="-XX:PermSize=64m -XX:MaxPermSize=512m -Dfile.encoding=UTF8"
Whatever I change in it, makes Tomcat unable to start again
Env. info:
Installed manually
Environment: Linux Debian 7
Tomcat 7.0.28
java version "1.7.0_65"
Data sourse: Firebird 2.5, URL used: jdbc:firebirdsql://localhost:3050//home/shared/firebird/KB.fdb?encoding=UTF8
in Preview and pdf foreign characters are missing both in static text (i.e. column labels) and in data
Karolina
Offline
Hi Karolina,
I think I finally figured it out: In the end it all comes down to a font issue: Our pdf-libraries default font helvetica, despite including all the necessary characters, seemingly has no unicode mapping. So for the dynamic list pdf export we just changed the font and things are fine. To get you jasper report working you unfortunately have to make changes to the reports. You can either keep the default font and change the Pdf Encoding to CP1250 (Central European) (for each Text-Field or by defining a default style). Your other option is to switch fonts to e.g. DejaVu Sans. Both should resolve the issue.
We will probably provide a new build by the end of next week, if you don't want to wait until then, download these two files and place them in your WEB-INF/lib directory.
http://www2.datenwerke.net/files/forum/ … s-2.34.jar
http://www2.datenwerke.net/files/forum/rsbase.jar
Cheers,
Thorsten
Hi,
Thanks - Jasper reports work fine now
Dynamic List:
I copied the files and restarted reportserver.
Fonts are OK now, but I have something like that: TüööäE_3STß: in every cell of a report (Dynamic List pdf export).
In the headline of Dynamic List pdf export some characters are still missing.
The text in footer (i.e. number of pages) is in German, no matter which locale is used (I use English).
Karolina
Offline
Hi Karolina,
thank you for testing this. I removed the extra characters and fixed the broken header.
You can download the revised rsbase.jar from
http://www2.datenwerke.net/files/forum/rsbase.jar
As for the page numbers, I just changed them to a more universal x/y, we will change this into a localised text later.
-Thorsten
Now it works fine - thanks!
Offline
Hi,
Do all mentioned steps also working for Reportserver version 2.2 ?
Offline
Hi,
you actually want to know if this is for 2.1, don't you?
Unfortunately the supplied patch is for 2.2 (the upcoming version), only.
But I think, if you need this in 2.1 we can also make the necessary changes there.
Cheers,
Thorsten
Pages: 1
Topic closed