Text missing after special character in jasper report.

The text in my static text box has a special character like (%,/,#) in my case which when generated in pdf is missing and sometimes the special character is visible but text after that is missing.

below is my static text tags.

<staticText>
   <reportElement mode="Opaque" x="769" y="0" width="41" height="30" backcolor="#BDBDBD" uuid="b8001e8d-b720-46a3-a117-293a5a881ad4"/>
   <box>
      <bottomPen lineWidth="1.0"/>
   </box>
   <textElement textAlignment="Center" markup="html">
      <font fontName="SansSerif" isBold="true"/>
   </textElement>
   <text><![CDATA[<strong>Monthly % Goal</strong>]]></text>     
</staticText>

<staticText>
   <reportElement x="200" y="53" width="160" height="20" uuid="f7d2a9f7-53a6-46ce-8498-696e5a84381a"/>
   <textElement textAlignment="Left" verticalAlignment="Middle" markup="html">
      <font fontName="SansSerif" isBold="true"/>
   </textElement>
   <text><![CDATA[<strong>Inspection Required / Frequency</strong>]]</text>
</staticText>
mehul.gupta's picture
Joined: May 5 2023 - 5:39am
Last seen: 4 months 2 weeks ago

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.

arai_4 - 4 months 2 weeks ago

Hello Mehul,

In my case it is working fine and I can't reproduce the issue:

Can you provide more details about the problem?

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 8.0.2.final using JasperReports Library version hotfix-6.18.1-SNAPSHOT-2961835b2212865be359a43768fc5fa9b356148c -->
<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="community" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b9d5d5d8-3ab1-45ab-bba5-9b9987678417">
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch"/>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="125" splitType="Stretch">
<staticText>
<reportElement mode="Opaque" x="120" y="20" width="180" height="60" backcolor="#BDBDBD" uuid="b8001e8d-b720-46a3-a117-293a5a881ad4"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" markup="html">
<font fontName="SansSerif" isBold="true"/>
</textElement>
<text><![CDATA[<strong>Monthly % Goal</strong>]]></text>
</staticText>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>

ddonofr - 4 months 2 weeks ago

Hi ddonofr,

I am facing this problem when I am deploying my java service where this jrxml is getting filled using jasperfiller. But on my local system I am getting the desired output.

  

mehul.gupta - 4 months 2 weeks ago
show 1 more...

Hello, which java version are you using? If not already have you tried switching on 1.8 ?

ddonofr - 4 months 2 weeks ago

1 Answer:

Hi,

is it possible that you are not loading the fonts into the project? This may be the problem. Look at this:

https://community.jaspersoft.com/wiki/custom-font-font-extension

I hope you can fix it!

huargo's picture
64
Joined: Oct 24 2019 - 1:13am
Last seen: 4 months 1 week ago
Feedback
randomness