ireport自动拉伸子报表(列表)

时间:2017-03-23 14:23:30

标签: jasper-reports subreport

我面临静态文本元素自动拉伸的问题。

首先,静态文本拉伸工作正常但报告设计中存在小问题。

当子报表不适合页面的其余部分时,它将移动到下一页但静态文本元素不会停止,因此是否有任何属性我可以更改以使文本拉伸停止并从下一页。

enter image description here

masterReport.jrxml enter image description here

<?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="masterReport" pageWidth="555" pageHeight="802" columnWidth="515" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="63eed781-746d-48f3-95bf-4d004d528fbe">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <import value="net.sf.jasperreports.engine.*"/>
    <import value="java.util.*"/>
    <import value="net.sf.jasperreports.engine.data.*"/>
    <style name="style1" mode="Opaque" forecolor="#FFFFFF" backcolor="#56B45E" fill="Solid" hAlign="Center" vAlign="Middle" fontName="Times New Roman" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[""]]></defaultValueExpression>
    </parameter>
    <field name="textList" class="java.util.List"/>
    <pageHeader>
        <band height="50"/>
    </pageHeader>
    <detail>
        <band height="127">
            <subreport>
                <reportElement stretchType="RelativeToTallestObject" x="12" y="0" width="444" height="121" uuid="59f53351-cce3-491e-823a-174cf94daa14"/>
                <subreportParameter name="SUBREPORT_DIR">
                    <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
                </subreportParameter>
                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{textList})]]></dataSourceExpression>
                <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "subReport.jasper"]]></subreportExpression>
            </subreport>
            <staticText>
                <reportElement key="staticText-46" stretchType="RelativeToTallestObject" x="456" y="0" width="37" height="121" isPrintWhenDetailOverflows="true" forecolor="#000000" uuid="ac78d50b-3687-4cb3-a4e3-2069985c56b2"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
                    <pen lineWidth="1.0"/>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" rotation="Right">
                    <font fontName="Times New Roman" size="14" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Text List]]></text>
            </staticText>
        </band>
    </detail>
</jasperReport>

subReport.jrxml enter image description here

<?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="subReport" pageWidth="515" pageHeight="762" columnWidth="515" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="6c18451b-d0b4-4562-bb87-01e424596889">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <style name="style1" mode="Opaque" forecolor="#FFFFFF" backcolor="#56B45E" fill="Solid" hAlign="Center" vAlign="Middle" fontName="Times New Roman" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA[""]]></defaultValueExpression>
    </parameter>
    <field name="idNumber" class="java.lang.String"/>
    <field name="name" class="java.lang.String"/>
    <field name="age" class="java.lang.String"/>
    <detail>
        <band height="143" splitType="Stretch">
            <staticText>
                <reportElement key="staticText-46" x="289" y="0" width="138" height="17" forecolor="#000000" uuid="7399d645-f4cc-41a5-a48f-da4dff52d4ce"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[ID]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-46" x="151" y="0" width="138" height="17" forecolor="#000000" uuid="76ae6093-52b0-43e7-ae69-ab1678b4909d"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Name]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-46" x="13" y="0" width="138" height="17" forecolor="#000000" uuid="f8446613-d20b-4a32-9848-87693dac6441"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Age]]></text>
            </staticText>
            <textField isBlankWhenNull="true">
                <reportElement x="289" y="17" width="138" height="17" forecolor="#251542" uuid="c58cb3a2-aaad-470c-846b-c80ba5df2930"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{idNumber}]]></textFieldExpression>
            </textField>
            <textField isBlankWhenNull="true">
                <reportElement x="151" y="17" width="138" height="17" forecolor="#251542" uuid="e0db0a83-85a8-493a-8d54-eb9839ef7abc"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
            </textField>
            <textField isBlankWhenNull="true">
                <reportElement x="13" y="17" width="138" height="17" forecolor="#251542" uuid="db69bfc6-1da4-468b-aec6-6c545edcff8f"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{age}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-46" x="427" y="0" width="17" height="136" forecolor="#000000" uuid="63db6701-3111-43cc-8d77-2292842f4586"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
                    <pen lineWidth="0.75"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.75"/>
                    <rightPen lineWidth="0.75"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" rotation="Right">
                    <font fontName="Times New Roman" size="13" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[List]]></text>
            </staticText>
            <textField isBlankWhenNull="true">
                <reportElement x="427" y="85" width="17" height="34" forecolor="#251542" uuid="02c7e289-a619-4b2e-b191-b1406b7b53e7"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="3">
                    <pen lineWidth="0.0" lineColor="#000000"/>
                    <topPen lineWidth="0.0" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Middle" rotation="Right">
                    <font fontName="Times New Roman" size="12" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
            </textField>
            <textField isBlankWhenNull="true">
                <reportElement x="151" y="51" width="138" height="17" forecolor="#251542" uuid="11ca9fb1-60b6-4f81-961c-bfeaca33dadd"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-46" x="289" y="34" width="138" height="17" forecolor="#000000" uuid="886855be-2a05-43a0-99d1-24a23ecb1622"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[ID]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-46" x="13" y="34" width="138" height="17" forecolor="#000000" uuid="3d07c210-af51-4467-a66a-9f7f8006c3c2"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Age]]></text>
            </staticText>
            <textField isBlankWhenNull="true">
                <reportElement x="289" y="51" width="138" height="17" forecolor="#251542" uuid="caff4b7b-a2a4-49d9-add2-51cfc4c66aa3"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{idNumber}]]></textFieldExpression>
            </textField>
            <textField isBlankWhenNull="true">
                <reportElement x="13" y="51" width="138" height="17" forecolor="#251542" uuid="fa7ffef5-cbf8-4a68-a584-f0b85cb8dfbd"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{age}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-46" x="151" y="34" width="138" height="17" forecolor="#000000" uuid="257e2038-3d35-4508-9354-d98fefdbacb8"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Name]]></text>
            </staticText>
            <textField isBlankWhenNull="true">
                <reportElement x="151" y="85" width="138" height="17" forecolor="#251542" uuid="f4b1e490-8993-4b9d-a7de-636f22bfba46"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-46" x="289" y="68" width="138" height="17" forecolor="#000000" uuid="1288bc1c-9f0d-4070-9d28-72108eb2471c"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[ID]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-46" x="13" y="68" width="138" height="17" forecolor="#000000" uuid="e29fda37-33c9-4171-8bf8-e67d7037983e"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Age]]></text>
            </staticText>
            <textField isBlankWhenNull="true">
                <reportElement x="289" y="85" width="138" height="17" forecolor="#251542" uuid="371c9fcb-f1f8-4e12-8048-f3dde7bb247e"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{idNumber}]]></textFieldExpression>
            </textField>
            <textField isBlankWhenNull="true">
                <reportElement x="13" y="85" width="138" height="17" forecolor="#251542" uuid="d4f08dc5-cc0a-42c7-a6de-db641aa3a301"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{age}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-46" x="151" y="68" width="138" height="17" forecolor="#000000" uuid="09d07336-7434-4def-8b5f-851aea29a6b9"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Name]]></text>
            </staticText>
            <textField isBlankWhenNull="true">
                <reportElement x="151" y="119" width="138" height="17" forecolor="#251542" uuid="c43c96b6-f70c-4637-b3b9-33e820784199"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-46" x="289" y="102" width="138" height="17" forecolor="#000000" uuid="086d9d27-2333-48a7-a044-b662b874728a"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[ID]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-46" x="13" y="102" width="138" height="17" forecolor="#000000" uuid="b3146c21-5b0e-49b3-93bd-1ba52a9d8f5b"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Age]]></text>
            </staticText>
            <textField isBlankWhenNull="true">
                <reportElement x="289" y="119" width="138" height="17" forecolor="#251542" uuid="d6cc2477-945a-439e-96e6-f9acab2f79fb"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{idNumber}]]></textFieldExpression>
            </textField>
            <textField isBlankWhenNull="true">
                <reportElement x="13" y="119" width="138" height="17" forecolor="#251542" uuid="0abe2f18-74df-4db5-84a3-4cb6569e8cf5"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.5"/>
                    <leftPen lineWidth="0.75"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="9" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{age}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-46" x="151" y="102" width="138" height="17" forecolor="#000000" uuid="1936bd38-bdae-4b23-8cf9-378c168d1ca1"/>
                <box topPadding="0" leftPadding="0" bottomPadding="0">
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.75"/>
                    <leftPen lineWidth="0.5"/>
                    <bottomPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="10" isBold="true" pdfFontName="font.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
                </textElement>
                <text><![CDATA[Name]]></text>
            </staticText>
        </band>
    </detail>
</jasperReport>

0 个答案:

没有答案