Jump to content
We've recently updated our Privacy Statement, available here ×

Special Slovenie character "�" in iReport's "Report Query window"


robidomadenik

Recommended Posts

Hello.

 

I'm using iReport Designer 4.0.1 and have a connection to mySQL database.

Whene I fetch data from database and show it in iReports Report Query window -> Preview Data .......already there I don't see slovene specific character "Ä" in the records. WHY?

And something else....if I made a field with some static text also with slovene character "Ä", when I export report to PDF, there also this "Ä" character is missing.

 

What is wrong? Anybody?

 

Thanks,

Robi

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Robi,

The first issue sounds like a MySQL issue. The Slovenian character could get lost because the client has different settings from the server. Often a url like this can help:

jdbc:mysql://localhost:3306/jasperserver37?useUnicode=true&characterEncoding=UTF-8

The second issue is a font issue. You are generating the PDF with a font that doesn't include "Ä". The behavior of iText (which is what JasperReports is relying on) is to skip any characters not supported by the font.

Use font extensions and define an appropriate font. Then the PDF will be good.

Regards,
Matt

Link to comment
Share on other sites

Matt,

 

I've already have connection like:

jdbc:mysql://192.168.227.223/bass?setUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

but it's all the same...no special character "Ä" ....

 

Any other idea?

 

I will try this with PDF font, thanks....

Robi

Link to comment
Share on other sites

  • 1 year later...

WOW!! this actually worked! thanks!

To anyone who had problems with writing UTF-8 word (in my case hebrew language) in the "where" clause of a query in the Query editor and always got no results for the query although there are results. Create a new database connection with the following connection string: jdbc:mysql://IP/databaseName?useUnicode=true&characterEncoding=UTF-8

it solves the problem and the query starts to return results

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...