如何删除重复的页面

时间:2014-03-16 03:48:22

标签: jasper-reports

我使用 JasperReport 查询制作收据我认为只返回1行,但是当我预览时,它会显示3个页面,其中包含相同的数据。我该如何解决这个问题?

<?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="transactionOR" language="groovy" pageWidth="306" pageHeight="576" whenNoDataType="AllSectionsNoDetail" columnWidth="292" leftMargin="7" rightMargin="7" topMargin="7" bottomMargin="7" uuid="968bbf1f-f7c1-4dd6-99c2-4a7c3cab7d38">
<parameter name="paymentNature" class="java.lang.String"/>
<queryString>
    <![CDATA[select student.fName,student.mName,student.lName,transaction.date,transaction.orNum,transaction.amount from student, transaction, cashier where transaction.id=32 AND student.id=transaction.studID]]>
</queryString>
<field name="fName" class="java.lang.String"/>
<field name="mName" class="java.lang.String"/>
<field name="lName" class="java.lang.String"/>
<field name="date" class="java.lang.String"/>
<field name="orNum" class="java.lang.String"/>
<field name="amount" class="java.lang.Double"/>
<background>
    <band splitType="Stretch"/>
</background>
<title>
    <band height="13" splitType="Stretch"/>
</title>
<pageHeader>
    <band height="72" splitType="Stretch">
        <rectangle>
            <reportElement uuid="3a62e210-80e8-4342-9617-5c41f3d35c60" x="0" y="0" width="292" height="71"/>
        </rectangle>
        <staticText>
            <reportElement uuid="d0993bd9-75e0-42c3-8578-9b9ef58777cd" x="0" y="22" width="292" height="12"/>
            <textElement textAlignment="Center">
                <font size="7"/>
            </textElement>
            <text><![CDATA[Republic of the Philippines]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="838a03f7-1570-40cf-b35a-6c29acb3184f" x="0" y="37" width="292" height="12"/>
            <textElement textAlignment="Center">
                <font fontName="Onyx" size="11" isBold="true" isItalic="false" isStrikeThrough="false"/>
            </textElement>
            <text><![CDATA[WESTERN VISAYAS COLLEGE OF SCIENCE & TECHNOLOGY]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="bacee43a-fc29-4010-ac79-471e0f34a6ad" x="0" y="50" width="292" height="8"/>
            <textElement textAlignment="Center">
                <font size="5"/>
            </textElement>
            <text><![CDATA[La Paz, Iloilo City]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="01efc4e9-f3f6-4f79-b717-df7e11bade3c" x="81" y="56" width="73" height="8"/>
            <textElement>
                <font size="5"/>
            </textElement>
            <text><![CDATA[Telefax: 329-42-74]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="e80e1177-df1b-4197-ae23-3af1789d3f3a" x="133" y="58" width="7" height="6"/>
            <textElement>
                <font size="3"/>
            </textElement>
            <text><![CDATA[☻]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="e5cd5ff6-c321-4a8c-be6f-b1ea19d14a10" x="143" y="56" width="100" height="12"/>
            <textElement>
                <font size="5"/>
            </textElement>
            <text><![CDATA[Email: wvcst@eudoramail.com]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="7524bd21-66e4-493b-9678-4cc2accb9d02" x="2" y="7" width="292" height="15"/>
            <textElement textAlignment="Center">
                <font fontName="Times New Roman" size="12" isBold="true"/>
            </textElement>
            <text><![CDATA[OFFICIAL RECEIPT]]></text>
        </staticText>
    </band>
</pageHeader>
<columnHeader>
    <band height="66" splitType="Stretch">
        <rectangle>
            <reportElement uuid="a7d6cd33-8771-44a5-9c00-516b5907417c" x="0" y="-1" width="292" height="66"/>
        </rectangle>
        <staticText>
            <reportElement uuid="cab7cefc-d92c-444d-9832-b9a1b8f855ef" x="0" y="14" width="139" height="13"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[Accountable Form No. 51]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="061ea79e-50e8-495b-86f0-9ecd6e1605b2" x="0" y="27" width="139" height="15"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[Revised August 1994]]></text>
        </staticText>
        <line>
            <reportElement uuid="4c951e64-4f01-44a0-b609-5f7877d291f2" x="139" y="0" width="1" height="66"/>
        </line>
        <staticText>
            <reportElement uuid="6403046d-1132-4540-9cdd-ae36f478a1d6" x="140" y="5" width="152" height="13"/>
            <textElement textAlignment="Center">
                <font fontName="Times New Roman" isBold="true"/>
            </textElement>
            <text><![CDATA[ORIGINAL]]></text>
        </staticText>
    </band>
</columnHeader>
<detail>
    <band height="284" splitType="Stretch">
        <rectangle>
            <reportElement uuid="4b8cc839-13c4-4aeb-bdb9-1c1e8a27d78d" x="0" y="-1" width="292" height="285"/>
        </rectangle>
        <staticText>
            <reportElement uuid="9b72ec72-a9a8-42b8-84ca-cc4f2679fc15" x="0" y="0" width="292" height="11"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <text><![CDATA[ DATE]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="a653d85d-80a7-4237-8d29-9375bc926f76" x="0" y="27" width="292" height="12"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <text><![CDATA[ PAYOR]]></text>
        </staticText>
        <line>
            <reportElement uuid="312e95b6-d23e-40c5-8e2a-cf3c2af0c973" x="0" y="26" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="30762f82-ec8b-4b7c-9db5-3c42e04801ac" x="0" y="57" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="72304ef0-9cf1-4230-840c-a38f0f1c8b7e" x="0" y="87" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="4a28decc-92a3-43c0-a34b-0050f37d890e" x="137" y="58" width="1" height="29"/>
        </line>
        <line>
            <reportElement uuid="9f0d0020-e7d3-4fb5-874a-ef665b30fb42" x="217" y="58" width="1" height="29"/>
        </line>
        <staticText>
            <reportElement uuid="d9b2ecfd-dc14-46a4-947a-bd9aed9e6036" x="0" y="68" width="137" height="13"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[NATURE OF COLLECTION]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="c28a69c0-ee16-4e79-a519-0bffd9d91ebd" x="137" y="64" width="80" height="14"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[ACCOUNT]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="6b1882bb-c6fd-495c-bd4d-ed777a016ccb" x="137" y="74" width="80" height="13"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[CODE]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="575eb807-068d-453c-99a8-159f48eee3e4" x="217" y="67" width="75" height="14"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[AMOUNT]]></text>
        </staticText>
        <line>
            <reportElement uuid="8aa8b29f-cad7-49f0-be6a-13d3d7d3fba0" x="0" y="102" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="c969bc5f-73b4-4009-95a6-342b4e986239" x="0" y="118" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="2539197f-1a50-4d3c-9aa4-4af3235d481a" x="0" y="134" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="6b48700d-c6c5-4f44-b080-1effee1b5781" x="0" y="150" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="ed595400-b678-4420-be05-36a387a386c8" x="0" y="166" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="03f65db8-b794-4e7e-bc6c-5040df7603a9" x="0" y="183" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="fee46d80-9960-40a9-8ecd-57fa9741cefc" x="0" y="200" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="58fbc5b7-6c7e-4831-99bd-a666f6794cd7" x="0" y="217" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="43a3e5f2-588a-47ed-903a-c42087dd296b" x="0" y="234" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="515d58b2-173b-4299-b9d3-ab43cf5361ab" x="0" y="250" width="292" height="1"/>
        </line>
        <line>
            <reportElement uuid="be4ba355-ff75-4629-aaae-c64f73bd6708" x="137" y="88" width="1" height="163"/>
        </line>
        <line>
            <reportElement uuid="cd39a190-4122-4f09-9f92-656eaf103248" x="217" y="88" width="1" height="163"/>
        </line>
        <staticText>
            <reportElement uuid="3765870d-a484-4185-af8e-fd6cd1b21853" x="0" y="239" width="137" height="11"/>
            <textElement>
                <font size="8" isBold="true"/>
            </textElement>
            <text><![CDATA[  Total]]></text>
        </staticText>
        <line>
            <reportElement uuid="ffff3b8f-51b0-494f-ae07-1c88055bb3c3" x="0" y="267" width="292" height="1"/>
        </line>
        <staticText>
            <reportElement uuid="f224f09d-7653-44c5-9162-039b14ad70b2" x="0" y="251" width="292" height="7"/>
            <textElement>
                <font size="5"/>
            </textElement>
            <text><![CDATA[  Amount in words]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="97f11a22-5357-495e-ba2b-ff86c96019c6" x="155" y="0" width="29" height="14"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <text><![CDATA[OR No.:]]></text>
        </staticText>
        <textField>
            <reportElement uuid="d9b9c817-a71c-4be9-80d9-b499de80da36" x="184" y="0" width="100" height="14"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{orNum}]]></textFieldExpression>
        </textField>
        <textField pattern="MM/dd/yyyy">
            <reportElement uuid="2db1e30d-50e4-429f-ad96-d6b2a422a67a" x="48" y="0" width="100" height="14"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement uuid="547b59d5-0f08-4b68-a707-f761546a865f" x="48" y="27" width="244" height="12"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{lName}+","+$F{fName}+" "+$F{mName}]]></textFieldExpression>
        </textField>
        <textField pattern="#,##0.00;(#,##0.00)">
            <reportElement uuid="04fab191-5dd9-4609-96ec-3d47533a5abd" x="218" y="87" width="74" height="15"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{amount}]]></textFieldExpression>
        </textField>
        <textField pattern="#,##0.00;(#,##0.00)">
            <reportElement uuid="de101b1b-3e5f-42f3-ad48-214eda26fde0" x="217" y="234" width="75" height="16"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{amount}]]></textFieldExpression>
        </textField>
        <textField>
            <reportElement uuid="39b18672-5df8-44e6-b70f-4b22f5ae74f6" x="13" y="88" width="124" height="15"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <textFieldExpression><![CDATA[$P{paymentNature}]]></textFieldExpression>
        </textField>
    </band>
</detail>
<columnFooter>
    <band height="45" splitType="Stretch">
        <rectangle>
            <reportElement uuid="a49375ff-b413-4cdc-93d5-e75741b1e754" x="0" y="-1" width="292" height="45"/>
        </rectangle>
        <line>
            <reportElement uuid="28c37717-14ef-48cd-bd64-eb4cb517c724" x="107" y="15" width="185" height="1"/>
        </line>
        <line>
            <reportElement uuid="6cd231b2-be56-4c90-86f8-6b77372407a4" x="107" y="31" width="185" height="1"/>
        </line>
        <line>
            <reportElement uuid="5b842762-af0d-4fed-8dcc-4667bbaa1e56" x="233" y="0" width="1" height="45"/>
        </line>
        <line>
            <reportElement uuid="3ef3553b-4d57-41c1-af22-df471bd8b97c" x="172" y="0" width="1" height="45"/>
        </line>
        <line>
            <reportElement uuid="71e92014-fc9b-48a3-9b85-ba40bb6addba" x="107" y="0" width="1" height="31"/>
        </line>
        <rectangle>
            <reportElement uuid="5d47893d-9228-4d92-acec-3eae60319551" x="13" y="10" width="7" height="5"/>
        </rectangle>
        <rectangle>
            <reportElement uuid="5d47893d-9228-4d92-acec-3eae60319551" x="13" y="20" width="7" height="5"/>
        </rectangle>
        <rectangle>
            <reportElement uuid="5d47893d-9228-4d92-acec-3eae60319551" x="13" y="29" width="7" height="5"/>
        </rectangle>
        <staticText>
            <reportElement uuid="e7020d25-03c6-4533-8262-ec89d6c79a48" x="20" y="9" width="87" height="9"/>
            <textElement>
                <font size="5"/>
            </textElement>
            <text><![CDATA[   Cash]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="7a14d36a-a2b2-438b-88e8-fc74b4aaa206" x="20" y="19" width="87" height="8"/>
            <textElement>
                <font size="5"/>
            </textElement>
            <text><![CDATA[   Check]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="d2017cb0-a37b-4bf0-8b94-290f4baa70c2" x="20" y="28" width="87" height="8"/>
            <textElement>
                <font size="5"/>
            </textElement>
            <text><![CDATA[   Money Order]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="e660fd2f-faad-4695-900c-bb328f1aa69f" x="108" y="2" width="64" height="8"/>
            <textElement textAlignment="Center">
                <font size="5"/>
            </textElement>
            <text><![CDATA[DRAWEE]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="4c48786c-76fd-432d-ba76-f7235c7f6894" x="108" y="8" width="64" height="7"/>
            <textElement textAlignment="Center">
                <font size="5"/>
            </textElement>
            <text><![CDATA[BANK]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="38e13df6-d1e7-4ed0-993a-22ddc750d27c" x="173" y="5" width="60" height="8"/>
            <textElement textAlignment="Center">
                <font size="5"/>
            </textElement>
            <text><![CDATA[NUMBER]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="68b91c1a-7633-4a50-baf9-1f637ae6df15" x="234" y="5" width="58" height="8"/>
            <textElement textAlignment="Center">
                <font size="5"/>
            </textElement>
            <text><![CDATA[DATE]]></text>
        </staticText>
    </band>
</columnFooter>
<pageFooter>
    <band height="81" splitType="Stretch">
        <rectangle>
            <reportElement uuid="ffe1164c-ee3f-4f6e-a615-d0a9704228a6" x="0" y="-1" width="292" height="53"/>
        </rectangle>
        <staticText>
            <reportElement uuid="b032b9f9-9f19-42f6-a757-4e9846550a52" x="0" y="6" width="292" height="13"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <text><![CDATA[  Received the amount stated above]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="3d1450fe-993b-4107-bf3e-3dc94f17cd76" x="149" y="26" width="143" height="12"/>
            <textElement>
                <font size="8"/>
            </textElement>
            <text><![CDATA[By:]]></text>
        </staticText>
        <line>
            <reportElement uuid="6dff5eed-7935-49f8-8e4b-1cd4575bfb17" x="166" y="38" width="118" height="1"/>
        </line>
        <staticText>
            <reportElement uuid="dc9b9910-5b33-4a24-bdd3-0c9b1fdc4894" x="149" y="39" width="143" height="13"/>
            <textElement textAlignment="Center">
                <font size="7"/>
            </textElement>
            <text><![CDATA[   COLLECTING OFFICER]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="96589668-497d-4a4f-a2ae-1263a5bdfbf4" x="0" y="53" width="292" height="11"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[NOTE:    Write the number and date of the receipt on the]]></text>
        </staticText>
        <staticText>
            <reportElement uuid="b72aa7de-0a71-4bcd-b24b-36438f66e5db" x="0" y="62" width="292" height="15"/>
            <textElement textAlignment="Center">
                <font size="8"/>
            </textElement>
            <text><![CDATA[    back of check or money order received]]></text>
        </staticText>
    </band>
</pageFooter>
<summary>
    <band splitType="Stretch"/>
</summary></jasperReport>

如果我错了,请纠正我,但我正在使用页面的自定义设置。它实际上是一张半尺寸的长信纸,我在 JasperReports 中表现不佳。

0 个答案:

没有答案