Я использую инструмент i Reports для генерации отчетов
Когда я выполняю отдельный отчет Sub, я получаю данные 2 страниц (12 строк). Но, когда я включил подотчет в основной отчет, я получаю только 2 строки с одинаковыми входными данными.
Невозможно правильно получить данные подотчета * при включении в основной отчет *
Основной отчет
<detail>
<band height="81">
<subreport>
<reportElement uuid="e9ca3880-f1a1-461f-884f-a489aeec6fcb" x="0" y="26" width="1568" height="45"/>
<subreportParameter name="HEADERDATELINK">
<subreportParameterExpression><![CDATA[$F{PARAM1}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="TODATELINK">
<subreportParameterExpression><![CDATA[$F{PARAM2}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "GLIMS_Limit_Expiry_Report_subreport3.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
Подотчет
<title>
<band height="52" splitType="Stretch">
<staticText>
<reportElement uuid="de16c344-fb48-4a5f-ae37-ef6af8cc289d" x="0" y="0" width="541" height="20"/>
<textElement>
<font fontName="DejaVu Sans" size="12" isBold="true" isUnderline="true"/>
</textElement>
<text><![CDATA[Limits About To Expire In 14 Days]]></text>
</staticText>
<textField isStretchWithOverflow="true">
<reportElement uuid="c06a0f90-cba3-4d66-a723-d188844dfc37" stretchType="RelativeToBandHeight" x="12" y="30" width="73" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Kurre(Pool Customer ID"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="4226cc4c-7d84-4d62-bd69-9ce3832ec6f8" stretchType="RelativeToTallestObject" x="85" y="30" width="84" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Pool Customer Name"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="c0d83896-9c71-4cc5-8568-93a71de1c359" x="179" y="30" width="70" height="20" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Justified" markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Arrangement Id"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="a7186b73-90bb-4e1e-933c-d997f31b0eef" x="252" y="30" width="73" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[" Pool Arrangement Name"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="21f7474e-d865-4b8c-af7a-599eec75fc93" x="336" y="30" width="75" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Entity Type"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="4f969954-c285-4ab8-bb36-49aff777c92f" x="411" y="29" width="100" height="21" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Technical Pool Id/Account No."]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="76f5162e-96ab-4ed6-a299-f58550f521c7" x="511" y="30" width="90" height="19" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Branch"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="796951c2-dc48-45e8-8bbc-5c10cc1245e6" x="601" y="29" width="50" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Entity Currency"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="1e185f25-d2ae-49da-83b0-d52040ecc490" x="667" y="29" width="41" height="19" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Limit Fee%"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="bc0bafd0-f519-4820-b62d-51a5b6adb2d6" x="814" y="28" width="75" height="21" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Limit Rule"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="cac0b03a-238b-4111-a1ba-0ce4f63a913f" x="910" y="29" width="49" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Limit Amount"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="4cf88feb-f891-4a97-a680-d377cfadb4ac" x="983" y="30" width="76" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Limit Start Date"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="60945689-4486-4b7f-946c-add2ef9c781d" x="1059" y="30" width="98" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Limit Maturity Date"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="4e77825d-23c9-4398-9e8c-3446db4814e4" x="1157" y="31" width="66" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Limit End Type"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="c83c1d0d-23e5-4338-ab25-a7328ab162c2" x="1223" y="30" width="82" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["AutoProlong-ation(Yes/No)"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="5a8a5831-329b-4ece-b6af-24cf269972f3" x="1405" y="30" width="108" height="20" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Description"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="b9cb2507-f8ac-4931-858a-ad678b1a0e28" x="1305" y="30" width="100" height="20" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center" markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["AutoProlong-ationTenure"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="584becc0-4530-4ed1-919d-fb0fa3b26692" x="719" y="29" width="82" height="19"/>
<textElement markup="none">
<font fontName="DejaVu Sans" size="12" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Limit Type"]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="29" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement uuid="e770ab42-f71f-4113-975a-9844c36ebc0f" stretchType="RelativeToTallestObject" x="12" y="2" width="73" height="19" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Customer ID}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="60aeaec4-99e5-4c01-80e6-f40374811ad6" x="85" y="1" width="84" height="20" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Customer Name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="e6f449ad-0c4f-4e7c-8e7c-744950a80faf" x="179" y="2" width="63" height="19" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Arrangement ID}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="b1147b18-30fa-411a-8feb-edd842b49999" x="252" y="3" width="73" height="17" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Arrangement Name}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="96c964ba-4439-4dde-a5fd-6277339028e1" x="336" y="1" width="75" height="20" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Entity Type}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="a3511ff8-20af-46f8-8ad2-8e59f94d747e" x="511" y="1" width="90" height="19" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Branch ID}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="b9956be8-0444-4dc7-9914-cb3b0b21b08b" x="601" y="0" width="50" height="20" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Entity Currency}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="fc8b6cd0-fb2d-471e-9cc0-6dfc37b4c5a4" x="667" y="2" width="41" height="18" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Limit Fee(%)}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="0a5b34d7-1906-4a4a-9d16-890045815eeb" x="814" y="1" width="75" height="20" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Justified">
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Limit Rule}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="7c51543c-7882-4172-aafe-491348ac57e9" x="910" y="2" width="68" height="18" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Limit Amount}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd-MMM-yyyy">
<reportElement uuid="fde758c0-a99b-45f4-95e3-95281bfda7e7" x="983" y="2" width="76" height="18" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Limit Start Date}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="702a627e-cac0-4696-b7d2-2b40fc8d6d2b" x="1223" y="1" width="82" height="19" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Auto Prolongation}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="c7571a83-e1a5-4519-9981-1b2392fb708a" x="1305" y="1" width="100" height="19" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{AutoProlongation Tenure}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="bd3501ed-a4df-473d-92c7-80998605ad28" x="1405" y="1" width="139" height="19" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{DESCRIPTION}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="63a7158f-a0f6-41fd-ad2b-9ab3a3ff5ced" x="719" y="3" width="82" height="18"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{LIMIT TYPE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="2cd11534-3ff3-44ea-b536-5da2a140e661" x="1059" y="2" width="98" height="18" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Limit Maturity Date}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="0c63ee49-31fd-49c9-ab99-ddb51277fff7" x="411" y="2" width="100" height="18" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Pool ID/Account}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="86946d8d-0166-4930-9eac-13477e45b7a7" x="1157" y="2" width="66" height="18" isPrintWhenDetailOverflows="true"/>
<textElement>
<font fontName="DejaVu Sans" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$F{Limit End Type}]]></textFieldExpression>
</textField>
</band>
</detail>