Jump to content
Changes to the Jaspersoft community edition download ×

PDF export - Dynamic text overflows in horizontal way


aude.allouard

Recommended Posts

Hello,

I have a problem when I export in PDF format, a report made by Jasper report Studio. The dynamic text which is very long overflows of a cell.

My configuration is the following : 

<frame borderSplitType="NoBorders">
<reportElement positionType="Float" x="0" y="312" width="555" height="26" uuid="bb96afb9-23ab-4e41-a40f-5c35ef30a977">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.grid.JSSGridBagLayout"/>
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<property name="com.jaspersoft.layout.grid.x" value="0"/>
<property name="com.jaspersoft.layout.grid.y" value="-1"/>
<property name="com.jaspersoft.layout.grid.weight.x" value="4.0"/>
<property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/>
<property name="com.jaspersoft.layout.grid.rowspan" value="1"/>
<property name="com.jaspersoft.layout.grid.colspan" value="4"/>
<property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/>
<property name="ShowOutOfBoundContent" value="true"/>
</reportElement>
<box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<staticText>
<reportElement style="Titre" positionType="Float" stretchType="RelativeToTallestObject" mode="Opaque" x="0" y="0" width="185" height="26" isPrintWhenDetailOverflows="true" forecolor="#FFFFFF" backcolor="#3978BD" uuid="57909dbe-d6d7-4586-a249-5e6e009b6464">
<property name="com.jaspersoft.layout.grid.x" value="0"/>
<property name="com.jaspersoft.layout.grid.y" value="0"/>
<property name="com.jaspersoft.layout.grid.weight.x" value="1.5"/>
<property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/>
<property name="com.jaspersoft.layout.grid.rowspan" value="1"/>
<property name="com.jaspersoft.layout.grid.colspan" value="1"/>
<property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/>
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
</reportElement>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="SansSerif"/>
<paragraph leftIndent="4"/>
</textElement>
<text><![CDATA[Observations]]></text>
</staticText>
<textField isStretchWithOverflow="true">
<reportElement style="Texte" positionType="Float" x="185" y="0" width="370" height="26" isPrintWhenDetailOverflows="true" uuid="e8200ef4-8ef0-486c-84dd-e1e6027ccf72">
<property name="com.jaspersoft.layout.grid.x" value="-1"/>
<property name="com.jaspersoft.layout.grid.y" value="-1"/>
<property name="com.jaspersoft.layout.grid.weight.x" value="3.0"/>
<property name="com.jaspersoft.layout.grid.weight.y" value="1.0"/>
<property name="com.jaspersoft.layout.grid.rowspan" value="1"/>
<property name="com.jaspersoft.layout.grid.colspan" value="3"/>
<property name="com.jaspersoft.layout.grid.weight.fixed" value="false"/>
</reportElement>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle" markup="none">
<font fontName="SansSerif"/>
<paragraph lineSpacing="Single" leftIndent="4" rightIndent="4"/>
</textElement>
<textFieldExpression><![CDATA[$F{observations}]]></textFieldExpression>
</textField>
</frame>
 
The PDF export results is the following :
Jasperstudio(1).png.c72dabd3a8a444e3430408dee3f00828.png
 

The text is correctly stretched in vertical way but it overflows in the horizontal way. Moreover, when I change the "left Indent" parameter of the text field from 4 to 0, the text does'nt overflow in horizontal way but the end of the text is missing.

Have you already encountered this problem ? Please I need help.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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