I have a textfield and a subreport in detail band. I pass the value to the subreport which displays details for the particular record. The problem is the textfield doesn't stretch when the subreport displays some value.
Here is a part of my jrxml with detail band:
<detail>
<band height="40" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
style="columnHeader"
mode="Opaque"
x="0"
y="0"
width="108"
height="20"
backcolor="#9999FF"
key="groupMenu-1"/>
<box></box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font pdfFontName="Helvetica-Bold" isBold="true" isPdfEmbedded ="false" pdfEncoding ="Cp1252"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[str("Code")]]></textFieldExpression>
</textField>
<subreport isUsingCache="true">
<reportElement
mode="Transparent"
x="0"
y="39"
width="100"
height="1"
key="subreport-1"
stretchType="RelativeToTallestObject"
positionType="Float"
isPrintWhenDetailOverflows="true"/>
<subreportParameter name="requestListId">
<subreportParameterExpression><![CDATA[$F{SPREADSHEET_REPORT_ID}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{subReportPath}]]></subreportExpression>
</subreport>
</band>
</detail>