Hi. I've got a problem, which I've been struggling with for quite some time now. Finally I've decided to write about it on the forum, since I don't have a clue what to do about it anymore.Hope you could figure somthing out. Problem: There is a textfield with option "Stretch with overflow". It is populated dynamically from datasource objects, passed to the subreport from the main report. A text somtimes is longer than textfield's width so it wraps and streches vertically accordingly. Most of the time it streches correctly, to the number of lines of text. But sometimes it adds extra blank line (space) under the text. Things checked: - text is trimmed (checked for extra whitespaces and new line characters) - text is not ending close to the border of textfield Tried: - changing different fonts, encodings - adding padding to textfield - changing textfield width and height to smaller and bigger (even to 0) - changing Position type and Strech type of the textfield and surrounding elements - changing text alignment - changing jasperreports version - adding different text properties like net.sf.jasperreports.text.truncate.at.char - setting different exporter properties like JRPdfExporterParameter.FORCE_LINEBREAK_POLICY I will post any additional information if needed. Looking forward to any comments and suggestions. Regards, Kacper Code:<?xml version="1.0" encoding="UTF-8"?><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="subGroupSubreport" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0"> <parameter name="episode" class="pl.psnc.domain.wtc.core.episode.Episode"/> <parameter name="groupSummarySubreport" class="net.sf.jasperreports.engine.JasperReport"/> <parameter name="isInjuryMap" class="java.lang.Boolean"/> <queryString> <![CDATA[]]> </queryString> <field name="shortDisplayName" class="java.lang.String"/> <field name="attributeUIs" class="java.util.Set"/> <field name="attributeOids" class="java.util.Collection"/> <field name="displayIndex" class="java.lang.Integer"/> <sortField name="displayIndex"/> <variable name="date" class="java.lang.String" resetType="None"> <variableExpression><![CDATA[($F{attributeOids}.size() > 0 ? ((String) new ArrayList($P{episode}.getResultsDatesInMilisecondsForAttributes($F{attributeOids})).get(0)) : "")]]></variableExpression> </variable> <variable name="multi" class="java.lang.String"> <variableExpression><![CDATA[($F{attributeOids}.size() > 0 ? ((String) new ArrayList($P{episode}.getResultsMultiNamesForAttributes($F{attributeOids})).get(0)) : "")]]></variableExpression> </variable> <variable name="test" class="java.lang.Integer" incrementType="Column"/> <variable name="dates" class="java.util.List"> <variableExpression><![CDATA[new java.util.ArrayList($P{episode}.getResultsDatesInMilisecondsForAttributes($F{attributeOids}))]]></variableExpression> </variable> <detail> <band height="31" splitType="Stretch"> <frame> <reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="14" width="255" height="17" isRemoveLineWhenBlank="true"/> <box leftPadding="0"> <pen lineWidth="0.0" lineColor="#CCCC00"/> <topPen lineWidth="0.0" lineColor="#CCCC00"/> <leftPen lineWidth="0.0" lineColor="#CCCC00"/> <bottomPen lineWidth="0.0" lineColor="#CCCC00"/> <rightPen lineWidth="0.0" lineColor="#CCCC00"/> </box> <subreport isUsingCache="false"> <reportElement positionType="Float" x="0" y="0" width="255" height="17" isRemoveLineWhenBlank="true"/> <subreportParameter name="episode"> <subreportParameterExpression><![CDATA[$P{episode}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="multi"> <subreportParameterExpression><![CDATA[$V{multi}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="isInjuryMap"> <subreportParameterExpression><![CDATA[new Boolean($P{isInjuryMap}.booleanValue() && $V{REPORT_COUNT}.intValue() == 1)]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="date"> <subreportParameterExpression><![CDATA[$V{date}]]></subreportParameterExpression> </subreportParameter> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{attributeUIs})]]></dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{groupSummarySubreport}]]></subreportExpression> </subreport> </frame> <textField isStretchWithOverflow="true" isBlankWhenNull="false"> <reportElement positionType="Float" x="0" y="0" width="255" height="14" isRemoveLineWhenBlank="true" forecolor="#5D99B1"> <printWhenExpression><![CDATA[new Boolean(!$P{isInjuryMap}.booleanValue() || ($P{isInjuryMap}.booleanValue() && $V{REPORT_COUNT}.intValue() > 1))]]></printWhenExpression> </reportElement> <box leftPadding="8" rightPadding="15"> <pen lineWidth="0.25" lineColor="#0000CC"/> <topPen lineWidth="0.25" lineColor="#0000CC"/> <leftPen lineWidth="0.25" lineColor="#0000CC"/> <bottomPen lineWidth="0.25" lineColor="#0000CC"/> <rightPen lineWidth="0.25" lineColor="#0000CC"/> </box> <textElement textAlignment="Left"> <font fontName="DejaVuSansMono" size="12" isBold="true" pdfEncoding="Cp1250"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{shortDisplayName}.trim().replaceAll("\r","").replaceAll("\n","")]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="false"> <reportElement positionType="Float" x="0" y="0" width="210" height="14" isRemoveLineWhenBlank="true" forecolor="#5D99B1"> <property name="net.sf.jasperreports.text.truncate.at.char" value="true"/> <property name="net.sf.jasperreports.print.keep.full.text" value="true"/> <printWhenExpression><![CDATA[new Boolean($P{isInjuryMap}.booleanValue() && $V{REPORT_COUNT}.intValue() == 1)]]></printWhenExpression> </reportElement> <box leftPadding="8" rightPadding="15"> <pen lineWidth="0.25" lineColor="#0000CC"/> <topPen lineWidth="0.25" lineColor="#0000CC"/> <leftPen lineWidth="0.25" lineColor="#0000CC"/> <bottomPen lineWidth="0.25" lineColor="#0000CC"/> <rightPen lineWidth="0.25" lineColor="#0000CC"/> </box> <textElement textAlignment="Left"> <font fontName="DejaVuSansMono" size="12" isBold="true" pdfFontName="Helvetica" pdfEncoding="Cp1250"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{shortDisplayName}.trim().replaceAll("\r","").replaceAll("\n","")]]></textFieldExpression> </textField> </band> </detail></jasperReport>