4
votes

I've built a report using iReport. In one of the report's fields we enter a name in Farsi. If I run the underlying query on database(Oracle) it works but when I run the report it's not working. It looks like unicode parameter is not sent correctly to the query.(My report title is in Farsi and it is shown correctly)

Has anybody had this problem?

1
which versions of iReport and Jasper are you working on? - Rachcha
@Rachcha version 5.0.0 - Oak

1 Answers

2
votes
  1. In your Jasper Environment "IReport"
    If you want to generate a PDF report for example
    Its better to choose (Preview -> PDF Preview) from your ireport app
    NOT default value (Internal Preview)

  2. Text fields properties

For Text fields you should to assign some properties
1. Font name : a font that support your locale "Farsi"
2. Pdf font name : a font that support your locale "Farsi"
3. Pdf Embeded : true
4. Pdf Encoding : depend on your language "Farsi" -> "Identity-H (Unicode with horizontal writing)"

Note
If you does NOT install a font that support your language "Farsi"
Its so easy
Just get your favorite font "....ttf"
Then from ireport
(Tools -> Options -> Fonts tab -> Install Font button -> .... )