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>
1 Answer:
Posted on May 9, 2023 at 11:43pm
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!
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.
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>
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.
Hello, which java version are you using? If not already have you tried switching on 1.8 ?