Jasper报表中的行距

时间:2018-10-06 09:09:43

标签: java

在Jasper Reports中创建了一个报告,并且无法调整打印行之间的行距,行之间的打印空间似乎太大。 行距始终为1.0,无法更改它。 有人可以帮助解决这个问题吗? 附加XML文件。 谢谢

<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="report name" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="166b8e6b-d773-43b8-ada8-fc6af1fd6d81">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
    <![CDATA[select * from items]]>
</queryString>
<field name="ItemCode" class="java.lang.Integer">
    <fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="ItemName" class="java.lang.String">
    <fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="ItemUnitPrice" class="java.lang.Float">
    <fieldDescription><![CDATA[]]></fieldDescription>
</field>
<background>
    <band splitType="Stretch"/>
</background>
<title>
    <band height="79" splitType="Stretch"/>
</title>
<pageHeader>
    <band height="38" splitType="Stretch">
        <staticText>
            <reportElement x="205" y="0" width="143" height="35" uuid="a6d8f0c1-a506-4afa-b59f-268f29a90cc3"/>
            <textElement>
                <font size="16"/>
            </textElement>
            <text><![CDATA[ITEMS PRICE LIST]]></text>
        </staticText>
        <line>
            <reportElement x="0" y="34" width="555" height="1" uuid="5d207d7f-2bad-4b92-b03e-65d8bac4229d"/>
        </line>
    </band>
</pageHeader>
<columnHeader>
    <band height="27" splitType="Stretch">
        <staticText>
            <reportElement x="0" y="0" width="100" height="20" uuid="980d03f8-b20d-49b4-b466-cf98b072518f"/>
            <textElement>
                <font size="13"/>
            </textElement>
            <text><![CDATA[Code]]></text>
        </staticText>
        <staticText>
            <reportElement x="141" y="0" width="100" height="20" uuid="0b0284fd-0aaf-4b8d-98f9-88b754ec72e3"/>
            <textElement>
                <font size="13"/>
            </textElement>
            <text><![CDATA[Description ]]></text>
        </staticText>
        <staticText>
            <reportElement x="287" y="0" width="100" height="20" uuid="50fc3a31-f398-4c90-968b-19b3d01ff91b"/>
            <textElement>
                <font size="13"/>
            </textElement>
            <text><![CDATA[Unit Price]]></text>
        </staticText>
    </band>
</columnHeader>
<detail>
    <band height="20" splitType="Stretch">
        <textField>
            <reportElement x="0" y="0" width="100" height="20" uuid="33381579-edd3-4086-8d04-81cd996a06c4"/>
            <textElement textAlignment="Center">
                <paragraph lineSpacing="Proportional"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{ItemCode}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="142" y="0" width="100" height="20" uuid="c4150bab-687e-473f-a18c-a2792ce8898d"/>
            <textElement>
                <paragraph lineSpacing="Proportional"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{ItemName}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement x="287" y="0" width="59" height="20" uuid="2c0d3cf8-de37-4889-ba3b-6c70ba90e080"/>
            <box leftPadding="35"/>
            <textElement textAlignment="Right">
                <font isUnderline="false"/>
                <paragraph lineSpacing="Proportional"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{ItemUnitPrice}]]></textFieldExpression>
        </textField>
    </band>
</detail>
<columnFooter>
    <band height="1" splitType="Stretch"/>
</columnFooter>
<pageFooter>
    <band height="20" splitType="Stretch">
        <staticText>
            <reportElement x="0" y="0" width="100" height="20" uuid="62c2c360-df32-419e-ad76-0548292d7ddb"/>
            <text><![CDATA[End of report ...]]></text>
        </staticText>
        <textField>
            <reportElement x="455" y="0" width="100" height="20" uuid="b2b5f1f6-58de-4306-ab02-cbc23fa23719"/>
            <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
        </textField>
    </band>
</pageFooter>
<summary>
    <band height="42" splitType="Stretch"/>
</summary>

感谢您的帮助...

0 个答案:

没有答案