如何避免JasperReport在Excel中报告行拆分?

时间:2017-04-18 06:35:28

标签: jasper-reports export-to-excel

我使用 jasperreports-6.1.0.jar 生成Excel报告。当文本字段长度超过220个字符时,我在excel中遇到行拆分问题。

enter image description here

JRXML详细信息:

max_matrix(L, M) :-
    maplist(max_list, L, Ms),
    max_list(Ms, M).

我为整个报告添加了以下jrxml属性:

        <textField isStretchWithOverflow="true" isBlankWhenNull="true">
            <reportElement uuid="55da47e9-de3c-45ac-9b42-c0b9ee2bdcce" style="Sans_Normal" positionType="Float" stretchType="RelativeToTallestObject" x="775" y="0" width="27" height="70" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true">
                <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>
                <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                <property name="net.sf.jasperreports.export.xls.wrap.text" value="true"/>
            </reportElement>
            <box>
                <leftPen lineWidth="0.5"/>
                <bottomPen lineWidth="0.5"/>
                <rightPen lineWidth="0.5"/>
            </box>
            <textElement>
                <font size="10"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{annotationValue}]]></textFieldExpression>
        </textField>

0 个答案:

没有答案