robidomadenik Posted July 28, 2011 Share Posted July 28, 2011 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 More sharing options...
thehuha Posted July 28, 2011 Share Posted July 28, 2011 Try setting the PDF encoding to "CP1250".If it is already set to "CP1250", set it to something else, and then back to "CP1250".Not sure if it helps, but it worked for me a couple of times. Link to comment Share on other sites More sharing options...
mdahlman Posted July 28, 2011 Share Posted July 28, 2011 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-8The 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 More sharing options...
robidomadenik Posted July 29, 2011 Author Share Posted July 29, 2011 Matt, I've already have connection like:jdbc:mysql://192.168.227.223/bass?setUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8but 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 More sharing options...
robidomadenik Posted July 29, 2011 Author Share Posted July 29, 2011 Hello. I've already tried that, thanks...but didn't help. Thanks, Robi Link to comment Share on other sites More sharing options...
robidomadenik Posted July 29, 2011 Author Share Posted July 29, 2011 Hello again. Well, it's working now :) Thanks! I think combination of both things you said made my report to work now :) Thanks again and have a nice weekend,Robi Link to comment Share on other sites More sharing options...
rodnikosh Posted December 11, 2012 Share Posted December 11, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now