rkm258 Posted January 28, 2010 Share Posted January 28, 2010 Languages supported by the application - English, Spanish, French, Chinese and ArabicThe data in the database (postgres 8.4 with Encoding - UTF8) can contain these languages.Currently I'am trying to support Chinese Language in the existing reports (generated currently as pdf files) present in the application.Ex: Attached is a sample where Department Name, Subject Name, Course Name and others can be in any of the language types, accessed using $F{field name} syntax.1. A text field defined by IReports as below is working fine for Spanish, French and English, and I can see the text in the generated pdf file. The data is accessed using the $F{field name} syntax. <textField isStretchWithOverflow="true"> <reportElement x="0" y="0" width="105" height="34"/> <box leftPadding="3"> <pen lineColor="#8ABCFF"/> <topPen lineWidth="0.0" lineColor="#8ABCFF"/> <leftPen lineWidth="0.0" lineColor="#8ABCFF"/> <bottomPen lineWidth="0.0" lineColor="#8ABCFF"/> <rightPen lineWidth="0.75" lineColor="#8ABCFF"/> </box> <textElement verticalAlignment="Top"> <font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{course_name}]]></textFieldExpression> </textField>Question:1. I tried setting the Text Field element properties as below, but the pdf report is having blank contents Pdf Font Name - STSong-Light Pdf Embedded = TRUE Pdf Encoding - UniGB-UCS2-H (Chinese Simplified)2. How can I support Chinese, what are the changes I need to make in the report Text Fields element?3. Should there be separate Report Template jrxml files created for Chinese, OR can I support it by using the same jrxml files. Keeping in mind that there is English, Spanish and French too?4. Please provide me with any documentation/samples that will guide me with this?Any Suggestion as welcome,ThanksRamPost Edited by rmukkamalla at 01/29/2010 20:58 Link to comment Share on other sites More sharing options...
rkm258 Posted January 29, 2010 Author Share Posted January 29, 2010 I tried to see some sample in /demo of jasperreport, but i didnot see any examples where data is obtained from a database (hsqldb) and contains languages like chinese. Link to comment Share on other sites More sharing options...
rkm258 Posted February 17, 2010 Author Share Posted February 17, 2010 Just wanted to leave a note for others, who might have same issues -I had solved this using Spring based Font Extensions support in JR 3.5, and used Arial Unicode Font to support many languages, using the same report template. 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