我已经创建了一个新的子报告,它正在打印所有细节但是在主报告中如果我添加了多个细节,子报告将转到下一页,那么我不应该将子报告修复为即使我在主报告中添加了更多细节,也是同样的位置。我无法解决这个问题。请建议我。
主要报告:
<?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="esr-design-40" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" >
<property name="com.jasperassistant.designer.GridHeight" value="12"/>
<property name="com.jasperassistant.designer.GridWidth" value="12"/>
<property name="com.jasperassistant.designer.SnapToGrid" value="false"/>
<property name="com.jasperassistant.designer.Grid" value="false"/>
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="326"/>
<scriptlet name="esrgenerator" class="dk.comtalk.billing.server.util.ESRGenerator"/>
<parameter name="printAmount" class="java.lang.String"/>
<parameter name="invoiceId" class="java.lang.Integer"/>
<parameter name="customerId" class="java.lang.String"/>
<parameter name="entityName" class="java.lang.String"/>
<parameter name="entityAddress" class="java.lang.String"/>
<parameter name="entityCity" class="java.lang.String"/>
<parameter name="entityProvince" class="java.lang.String"/>
<parameter name="entityPostalCode" class="java.lang.String"/>
<parameter name="customerName" class="java.lang.String"/>
<parameter name="customerAddress" class="java.lang.String"/>
<parameter name="customerCity" class="java.lang.String"/>
<parameter name="customerProvince" class="java.lang.String"/>
<parameter name="customerPostalCode" class="java.lang.String"/>
<parameter name="entityLogo" class="java.io.File"/>
<parameter name="countryCode" class="java.lang.String"/>
<parameter name="balance" class="java.lang.String"/>
<parameter name="carriedBalance" class="java.lang.String"/>
<parameter name="invoiceDueDate" class="java.lang.String"/>
<parameter name="statusChangeDate" class="java.lang.String"/>
<parameter name="totalWithTax" class="java.lang.String"/>
<parameter name="newStatusId" class="java.lang.Integer"/>
<parameter name="invoiceInfoList" class="java.util.List"/>
<parameter name="ESRTotal" class="java.lang.String"/>
<parameter name="invoiceDate" class="java.lang.String"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["D:\\Ravi Workspace\\Openbrm\\open-brm-openbrm-2.0\\resources\\designs\\"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select count(*) from payment_invoice p where p.invoice_id=$P{invoiceId};]]>
</queryString>
<field name="payment_count" class="java.lang.Integer"/>
<group name="invoice_total">
<groupFooter>
<band/>
</groupFooter>
</group>
<title>
<band height="430">
<image>
<reportElement x="8" y="0" width="185" height="48" />
<imageExpression class="java.io.File"><![CDATA[$P{entityLogo}]]></imageExpression>
</image>
<textField>
<reportElement x="57" y="120" width="181" height="14" />
<textFieldExpression><![CDATA[$P{customerName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="57" y="148" width="294" height="14" />
<textFieldExpression><![CDATA[$P{customerPostalCode}+ " " + $P{customerCity}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="57" y="162" width="211" height="14" />
<textFieldExpression><![CDATA[$P{countryCode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="57" y="134" width="181" height="14" />
<textFieldExpression><![CDATA[$P{customerAddress}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="384" y="103" width="200" height="28" />
<textElement>
<font size="11" isBold="true"/>
</textElement>
<text><![CDATA[1. opomena za neizmireni racun]]></text>
</staticText>
<staticText>
<reportElement x="36" y="230" width="328" height="19" />
<text><![CDATA[Postovani gospodine/postovana gospodjo,]]></text>
</staticText>
<staticText>
<reportElement x="36" y="250" width="544" height="35" />
<text><![CDATA[Dozvolite da Vas podsetimo da je, po podacima naseg knjigovodstva od danasnjeg dana, sledeci telefonski racun jos otvoren:]]></text>
</staticText>
<staticText>
<reportElement x="35" y="346" width="549" height="34" />
<text><![CDATA[Ukoliko je Vasa uplata za ovde navedeni racun u medjuvremenu vec izvrsena, nemojte uzimati ovu opomenu u obzir. Ukoliko jos nije, molimo Vas da uplatu izvrsite odmah.]]></text>
</staticText>
<staticText>
<reportElement x="35" y="370" width="557" height="60" />
<text><![CDATA[Imajte u vidu da se kod opomena, uz regularni racun, placa administrativna taksa za obradu u visini od Fr. 20.00. Ev. deaktivacija servisa se, takodje, naplacuje dodatnih Fr. 20.00. Molimo Vas stoga za postovanje nasih rokova uplate.
Najlepse hvala.]]></text>
</staticText>
<staticText>
<reportElement x="405" y="173" width="134" height="14" />
<text><![CDATA[Wangen b. Brüttisellen,]]></text>
</staticText>
<textField>
<reportElement x="510" y="173" width="100" height="15" />
<textFieldExpression><![CDATA[new SimpleDateFormat("dd.MM.yyy").format(new SimpleDateFormat("MM/dd/yyy").parse($P{statusChangeDate}))]]></textFieldExpression>
</textField>
<subreport>
<reportElement x="37" y="274" width="556" height="55" isPrintInFirstWholeBand="true" />
<dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{invoiceInfoList})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "ageing-esr-40-srpski-subreport.jasper"]]></subreportExpression>
</subreport>
</band>
</title>
<pageHeader>
<band height="117">
<staticText>
<reportElement x="36" y="101" width="576" height="16" />
<text><![CDATA[Symphonica AG | Hegnaustrasse 17 | 8602 Wangen b. Brüttisellen | Telefon 0840 988 988 | Fax 043 536 05 43]]></text>
</staticText>
<staticText>
<reportElement x="35" y="8" width="243" height="26" />
<text><![CDATA[S postovanjem,
BALKATEL | Symphonica A.D.]]></text>
</staticText>
</band>
</pageHeader>
<summary>
<band height="294" splitType="Immediate">
<subreport>
<reportElement positionType="Float" x="0" y="30" width="592" height="109" isPrintInFirstWholeBand="true" />
<subreportParameter name="ESRTotal">
<subreportParameterExpression><![CDATA[$P{ESRTotal}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="entityCity">
<subreportParameterExpression><![CDATA[$P{entityCity}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="customerName">
<subreportParameterExpression><![CDATA[$P{customerName}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="invoiceDate">
<subreportParameterExpression><![CDATA[$P{invoiceDate}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="customerProvince">
<subreportParameterExpression><![CDATA[$P{customerProvince}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="invoiceId">
<subreportParameterExpression><![CDATA[$P{invoiceId}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="countryCode">
<subreportParameterExpression><![CDATA[$P{countryCode}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="statusChangeDate">
<subreportParameterExpression><![CDATA[$P{statusChangeDate}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="customerCity">
<subreportParameterExpression><![CDATA[$P{customerCity}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="invoiceDueDate">
<subreportParameterExpression><![CDATA[$P{invoiceDueDate}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="newStatusId">
<subreportParameterExpression><![CDATA[$P{newStatusId}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="customerPostalCode">
<subreportParameterExpression><![CDATA[$P{customerPostalCode}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="entityName">
<subreportParameterExpression><![CDATA[$P{entityName}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="balance">
<subreportParameterExpression><![CDATA[$P{balance}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="entityPostalCode">
<subreportParameterExpression><![CDATA[$P{entityPostalCode}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="customerId">
<subreportParameterExpression><![CDATA[$P{customerId}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="printAmount">
<subreportParameterExpression><![CDATA[$P{printAmount}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="entityAddress">
<subreportParameterExpression><![CDATA[$P{entityAddress}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="entityProvince">
<subreportParameterExpression><![CDATA[$P{entityProvince}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="customerAddress">
<subreportParameterExpression><![CDATA[$P{customerAddress}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="carriedBalance">
<subreportParameterExpression><![CDATA[$P{carriedBalance}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="totalWithTax">
<subreportParameterExpression><![CDATA[$P{totalWithTax}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="entityLogo">
<subreportParameterExpression><![CDATA[$P{entityLogo}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="invoiceInfoList">
<subreportParameterExpression><![CDATA[$P{invoiceInfoList}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "ageing-esr-40-srpski-ESR.jasper"]]></subreportExpression>
</subreport>
</band>
</summary>
</jasperReport>
子报表:
<?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="esr-design-40" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="595" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" >
<property name="com.jasperassistant.designer.GridHeight" value="12"/>
<property name="com.jasperassistant.designer.GridWidth" value="12"/>
<property name="com.jasperassistant.designer.SnapToGrid" value="false"/>
<property name="com.jasperassistant.designer.Grid" value="false"/>
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<scriptlet name="esrgenerator" class="dk.comtalk.billing.server.util.ESRGenerator"/>
<parameter name="printAmount" class="java.lang.String"/>
<parameter name="invoiceId" class="java.lang.Integer"/>
<parameter name="customerId" class="java.lang.String"/>
<parameter name="entityName" class="java.lang.String"/>
<parameter name="entityAddress" class="java.lang.String"/>
<parameter name="entityCity" class="java.lang.String"/>
<parameter name="entityProvince" class="java.lang.String"/>
<parameter name="entityPostalCode" class="java.lang.String"/>
<parameter name="customerName" class="java.lang.String"/>
<parameter name="customerAddress" class="java.lang.String"/>
<parameter name="customerCity" class="java.lang.String"/>
<parameter name="customerProvince" class="java.lang.String"/>
<parameter name="customerPostalCode" class="java.lang.String"/>
<parameter name="entityLogo" class="java.io.File"/>
<parameter name="countryCode" class="java.lang.String"/>
<parameter name="balance" class="java.lang.String"/>
<parameter name="carriedBalance" class="java.lang.String"/>
<parameter name="invoiceDueDate" class="java.lang.String"/>
<parameter name="statusChangeDate" class="java.lang.String"/>
<parameter name="totalWithTax" class="java.lang.String"/>
<parameter name="newStatusId" class="java.lang.Integer"/>
<parameter name="invoiceInfoList" class="java.util.List"/>
<parameter name="ESRTotal" class="java.lang.String"/>
<parameter name="invoiceDate" class="java.lang.String"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["D:\\Ravi Workspace\\Openbrm\\open-brm-openbrm-2.0\\resources\\designs\\"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select count(*) from payment_invoice p where p.invoice_id=$P{invoiceId};]]>
</queryString>
<group name="invoice_total">
<groupFooter>
<band/>
</groupFooter>
</group>
<title>
<band height="430"/>
</title>
<pageHeader>
<band height="117"/>
</pageHeader>
<summary>
<band height="294">
<textField>
<reportElement x="5" y="56" width="123" height="14" />
<textFieldExpression><![CDATA[$P{entityName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="5" y="68" width="153" height="14" />
<textFieldExpression><![CDATA[$P{entityAddress}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="5" y="81" width="226" height="14" />
<textFieldExpression><![CDATA[$P{entityPostalCode}+ " " + $P{entityCity}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="5" y="26" width="100" height="15" />
<text><![CDATA[6301 Zug]]></text>
</staticText>
<staticText>
<reportElement x="179" y="26" width="100" height="15" />
<text><![CDATA[6301 Zug]]></text>
</staticText>
<textField>
<reportElement x="179" y="56" width="123" height="14" />
<textFieldExpression><![CDATA[$P{entityName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="179" y="68" width="149" height="14" />
<textFieldExpression><![CDATA[$P{entityAddress}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="179" y="81" width="226" height="14" />
<textFieldExpression><![CDATA[$P{entityPostalCode}+ " " + $P{entityCity}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="97" y="110" width="100" height="14" />
<text><![CDATA[01-2653-5]]></text>
</staticText>
<staticText>
<reportElement x="272" y="110" width="100" height="16" />
<text><![CDATA[01-2653-5]]></text>
</staticText>
<textField>
<reportElement x="169" y="236" width="640" height="30" />
<textElement textAlignment="Left">
<font fontName="SansSerif" size="13"/>
</textElement>
<textFieldExpression><![CDATA[$P{esrgenerator_SCRIPTLET}.generateCodeline($P{ESRTotal}.split("\\s+")[1],"01",">","971786","+","0126535",">",$P{invoiceId})]]></textFieldExpression>
</textField>
<textField>
<reportElement x="353" y="132" width="181" height="14" />
<textFieldExpression><![CDATA[$P{customerName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="353" y="144" width="181" height="14" />
<textFieldExpression><![CDATA[$P{customerAddress}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="353" y="158" width="294" height="14" />
<textFieldExpression><![CDATA[$P{customerPostalCode}+ " " + $P{customerCity}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="8" y="193" width="181" height="14" />
<textFieldExpression><![CDATA[$P{customerName}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="8" y="205" width="181" height="14" />
<textFieldExpression><![CDATA[$P{customerAddress}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="8" y="218" width="251" height="14" />
<textFieldExpression><![CDATA[$P{customerPostalCode}+ " " + $P{customerCity}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="353" y="172" width="211" height="14" />
<textFieldExpression><![CDATA[$P{countryCode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="8" y="230" width="194" height="14" />
<textFieldExpression><![CDATA[$P{countryCode}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="353" y="92" width="424" height="19" />
<textElement>
<font fontName="SansSerif" size="11" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{esrgenerator_SCRIPTLET}.getReferenceNumber("971786",$P{invoiceId})]]></textFieldExpression>
</textField>
<textField>
<reportElement x="8" y="172" width="186" height="16" />
<textFieldExpression><![CDATA[$P{esrgenerator_SCRIPTLET}.getReferenceNumber("971786",$P{invoiceId})]]></textFieldExpression>
</textField>
<textField>
<reportElement x="132" y="142" width="47" height="15" />
<textElement>
<font fontName="SansSerif" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$P{esrgenerator_SCRIPTLET}.splitAmount($P{ESRTotal}.split("\\s+")[1].split("\\.")[1])]]></textFieldExpression>
</textField>
<textField>
<reportElement x="301" y="142" width="40" height="15" />
<textElement>
<font fontName="SansSerif" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$P{esrgenerator_SCRIPTLET}.splitAmount($P{ESRTotal}.split("\\s+")[1].split("\\.")[1])]]></textFieldExpression>
</textField>
<textField>
<reportElement x="2" y="142" width="105" height="15" />
<textElement textAlignment="Right">
<font fontName="SansSerif" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$P{esrgenerator_SCRIPTLET}.splitAmount($P{ESRTotal}.split("\\s+")[1].split("\\.")[0]).trim()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="173" y="142" width="105" height="15" />
<textElement textAlignment="Right">
<font fontName="SansSerif" size="11"/>
</textElement>
<textFieldExpression><![CDATA[$P{esrgenerator_SCRIPTLET}.splitAmount($P{ESRTotal}.split("\\s+")[1].split("\\.")[0]).trim()]]></textFieldExpression>
</textField>
</band>
</summary>
</jasperReport>
答案 0 :(得分:-1)
请参阅“拆分类型”,当前页面不足以显示子报告。