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

hieroglyphs are not displayed in the subreports


sam.barn

Recommended Posts

I have a report that consists of many sub-reports. All this is translated into different languages, including Chinese, the translated values are set from the Java program to the corresponding variables. Everything works fine with all languages except Chinese. Jasper's version 6.5.
In Java I assign the style like this:

        JRDesignStyle style = new JRDesignStyle();
        
        style.setFontName("Arial Unicode MS");
        style.setPdfFontName("Arial Unicode MS");
        style.setPdfEncoding("Identity-H");
        
        jasperPrint.setDefaultStyle(style);

The problem is that hieroglyphs are displayed only in the main report, in all subreports there is emptiness instead of hieroglyphs. With other languages, this problem does not arise.
What is the problem, what am I doing wrong?
 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I've previously ecountered a similar issue with non standard characters in subreports. I've managed to get around it by encoding the characters as HTML entities and treating the text field as html pre formatted. Probably a bit of a nightmare in your situation but possibly better than nothing.

 

<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.1.1  --><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4_2" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="89dcc541-e989-48bb-bfb0-bbdca713f702">    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>    <queryString>        <![CDATA[]]>    </queryString>    <title>        <band height="341" splitType="Stretch">            <textField isStretchWithOverflow="true">                <reportElement x="40" y="20" width="420" height="290" uuid="8936e074-380c-4cbd-96a1-22c389063f71"/>                <textElement markup="html">                    <font size="26"/>                </textElement>                <textFieldExpression><![CDATA["• <br> 嗰 <br> 個"]]></textFieldExpression>            </textField>        </band>    </title></jasperReport>

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...