2 u010395636 u010395636 于 2016.02.22 11:15 提问

jrxml报表,空白行问题。

新人刚学jrxml,在做表格时遇到空白行将表格一分为二的情况。
图片说明

表格的代码是:

 <band height="32">
            <staticText>
                <reportElement x="1" y="0" width="830" height="28" forecolor="#800000"/>
                <textElement textAlignment="Left" verticalAlignment="Middle">
                    <font fontName="宋体" size="14" isBold="true" isItalic="false" isUnderline="false"/>
                    <paragraph lineSpacingSize="2.0"/>
                </textElement>
                <text><![CDATA[审批历史记录]]></text>
            </staticText>
            <line>
                <reportElement x="1" y="30" width="830" height="1" forecolor="#C0C0C0"/>
            </line>
        </band>
        <band height="90">
            <componentElement>
                <reportElement x="1" y="1" width="530" height="1"/>
                <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
                    <datasetRun subDataset="Dataset1">
                        <datasetParameter name="processId">
                            <datasetParameterExpression><![CDATA[$P{processId}]]></datasetParameterExpression>
                        </datasetParameter>
                        <datasetParameter name="ContentList">
                            <datasetParameterExpression><![CDATA[$P{ContentList}]]></datasetParameterExpression>
                        </datasetParameter>
                        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                    </datasetRun>
                    <jr:column width="100">
                        <jr:tableHeader style="Table_TH" height="30">
                            <box>
                                <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#99BAE8"/>
                                <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#99BAE8"/>
                            </box>
                            <staticText>
                                <reportElement x="0" y="0" width="100" height="30" forecolor="#15418A" backcolor="#E8F0FD"/>
                                <textElement verticalAlignment="Middle">
                                    <font fontName="宋体" size="12" isBold="true"/>
                                </textElement>
                                <text><![CDATA[审批历史记录]]></text>
                            </staticText>
                        </jr:tableHeader>
                        <jr:tableFooter style="Table_TH" height="1">
                            <box>
                                <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#99BAE8"/>
                            </box>
                        </jr:tableFooter>
                        <jr:columnHeader style="Table_CH" height="30">
                            <box>
                                <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#99BAE8"/>
                                <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#99BAE8"/>
                                <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FAFAFA"/>
                            </box>
                            <staticText>
                                <reportElement x="0" y="0" width="100" height="30" forecolor="#400000" backcolor="#F6F6F6"/>
                                <box>
                                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#99BAE8"/>
                                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#99BAE8"/>
                                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#FAFAFA"/>
                                </box>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                    <font fontName="宋体" size="12" pdfFontName=""/>
                                </textElement>
                                <text><![CDATA[审批人]]></text>
                            </staticText>
                        </jr:columnHeader>
                        <jr:detailCell style="Table_TD" height="30">
                            <box>
                                <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#FAFAFA"/>
                                <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#99BAE8"/>
                                <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#FAFAFA"/>
                                <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FAFAFA"/>
                            </box>
                            <textField isStretchWithOverflow="true" pattern="">
                                <reportElement x="0" y="0" width="100" height="30"/>
                                <textElement textAlignment="Center" verticalAlignment="Middle">
                                    <font fontName="宋体" size="12" pdfFontName=""/>
                                </textElement>
                                <textFieldExpression><![CDATA[$F{ASSIGNEE}]]></textFieldExpression>
                            </textField>
                        </jr:detailCell>
                    </jr:column>
                    ...

还请各位大大赐教。

1个回答

u010395636
u010395636   2016.02.22 11:18

在符一张图片。
图片说明

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!