【问题标题】:stretch(overflow if data exceeds) a textfield in jasper reports拉伸(如果数据超出则溢出)碧玉报告中的文本字段
【发布时间】:2011-12-01 02:21:16
【问题描述】:

我在详细部分的子报表上方有一个文本字段,如果由于子报表导致数据溢出,则文本字段不会拉伸,如果我删除子报表,它会按预期工作。我应该怎么做才能拉伸文本字段。

这是我的详细信息部分:-

<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
    <reportElement
                    style="dNew"
                    mode="Opaque"
                    x="1290"
                    y="20"
                    width="111"
                    height="20"
                    key="value-6"
                    stretchType="RelativeToBandHeight"
                    isPrintWhenDetailOverflows="true"/>
    <box></box>
    <textElement textAlignment="Left" verticalAlignment="Top" markup="html">
        <font fontName="Arial" pdfFontName="Helvetica"/>
    </textElement>
    <textFieldExpression   class="java.lang.String"><![CDATA[( $F{STANDARD_CONTROLS}!=null ? $F{STANDARD_CONTROLS} : "-" )]]>
    </textFieldExpression>
</textField>
<subreport  isUsingCache="true">
    <reportElement
                    mode="Transparent"
                    x="0"
                    y="40"
                    width="320"
                    height="15"
                    key="subreport-1"
                    isRemoveLineWhenBlank="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>

【问题讨论】:

    标签: java jasper-reports


    【解决方案1】:

    set subreport's position type = "float".. 试试这个就行了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多