Jaspersoft 스튜디오를 사용하여 보고서를 만듭니다. Jasper 메인 보고서에 하위 보고서가 있습니다. 문제는 기본 보고서의 Detail band
에 하위 보고서를 추가하면 하위 보고서가 생성 된 횟수, 때로는 행 단위로 생성되기 때문에 전체 서브 보고서가 페이지 수로 반복되는 경우가 있으므로이 작업을 수행 할 수 없습니다. 같은 이유로 Summery Band
에 넣을 수 없습니다. 그것은 아래의 오류Jasper로 하위 보고서를 만들 수 없습니다.
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: Subreport overflowed on a band that does not support overflow.
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:467)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$18(ReportControler.java:442)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:334)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: Subreport overflowed on a band that does not support overflow.
at net.sf.jasperreports.engine.fill.FillerSubreportParent.addPage(FillerSubreportParent.java:113)
at net.sf.jasperreports.engine.fill.JRBaseFiller.addPageToParent(JRBaseFiller.java:1213)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.addPage(JRVerticalFiller.java:1836)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1919)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1948)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:730)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:264)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:124)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:540)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:393)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:704)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:203)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
내가 오류로 인해 아래로 페이지 헤더에 넣고 드릴 수 없습니다, 그렇지 않으면 그냥 실행 계속을 표시하기 때문에
나는 Column Footer Band
이나 바닥 글에 넣고 드릴 수 없습니다. 다음은
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: Infinite loop creating new page due to page header overflow.
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:467)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$18(ReportControler.java:442)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:334)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: Infinite loop creating new page due to page header overflow.
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFiller.java:415)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:258)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:124)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:540)
at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:120)
at java.lang.Thread.run(Unknown Source)
내 주 보고서 아래
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.0.0.final using JasperReports Library version 6.0.0 -->
<!-- 2014-12-16T11:26:41 -->
<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="Portfolio_View_Report" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="961f2f5f-8ed1-422c-9a1a-6b9dcdf1624f">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="xxx"/>
<parameter name="idPortfolio" class="java.lang.Integer"/>
<queryString>
<![CDATA[SELECT * FROM Client]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="119" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<image>
<reportElement x="210" y="1" width="140" height="76" uuid="f5d606fc-24d8-4536-9c35-56ce81c863c2"/>
<imageExpression><![CDATA["C:/Users/xxx/JaspersoftWorkspace/xxx/xxx.png"]]></imageExpression>
</image>
<staticText>
<reportElement x="0" y="80" width="210" height="30" uuid="8c8eb2f8-9d3d-46a0-9d4c-0d049e8c544d"/>
<textElement>
<font fontName="Times New Roman" size="14" isBold="true" isUnderline="true"/>
</textElement>
<text><![CDATA[Portfolio View Report]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="159" splitType="Stretch">
<staticText>
<reportElement x="-1" y="0" width="163" height="20" uuid="8ffdf975-7965-4402-b9af-ef7785872f24"/>
<textElement verticalAlignment="Middle">
<font fontName="Times New Roman"/>
</textElement>
<text><![CDATA[Generated By: xxx]]></text>
</staticText>
<textField pattern="dd-MM-yyyy">
<reportElement x="450" y="0" width="100" height="20" uuid="cfd44de8-bc3d-4a2d-9f53-b9fdb969b061"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<subreport runToBottom="true">
<reportElement stretchType="RelativeToTallestObject" x="0" y="55" width="555" height="60" uuid="a99b1643-200b-4d7c-ade2-26e30b4fcc82">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<subreportParameter name="idPortfolio">
<subreportParameterExpression><![CDATA[$P{idPortfolio}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA["Transactions_Report.jasper"]]></subreportExpression>
</subreport>
</band>
</pageHeader>
<detail>
<band height="36" splitType="Stretch">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
</band>
</detail>
<columnFooter>
<band height="285" splitType="Stretch">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
</band>
</columnFooter>
<pageFooter>
<band height="120" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="100" splitType="Stretch"/>
</summary>
</jasperReport>
의 코드는 다음과 뭐가 문제 내 하위 보고서
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.0.0.final using JasperReports Library version 6.0.0 -->
<!-- 2014-12-16T11:28:26 -->
<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="Transactions_Report" pageWidth="500" pageHeight="842" columnWidth="500" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="4204d16c-e22f-46a2-b4c5-8be93fa35bc4">
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="xxx"/>
<parameter name="idPortfolio" class="java.lang.Integer"/>
<queryString language="SQL">
<![CDATA[SELECT Transactions.`idTransactions`,
Transactions.`Transaction_TimeStamp`,
Transactions.`idPortfolio`,
CASE when Transactions.`Transaction_Amount` <= 0
THEN NULL
else Transaction_Amount
END AS Encashments,
CASE when Transactions.`Transaction_Amount` > 0
THEN NULL
else (Transactions.`Transaction_Amount`*-1)
END AS Additions,
Portfolio.Activation
FROM Transactions
INNER JOIN Portfolio ON Transactions.idPortfolio = Portfolio.idPortfolio
WHERE Transactions.idPortfolio= $P{idPortfolio}
ORDER BY `Transaction_TimeStamp` DESC]]>
</queryString>
<field name="Transaction_TimeStamp" class="java.sql.Date">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="Additions" class="java.lang.Double"/>
<field name="Encashments" class="java.lang.Double"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="47" splitType="Stretch">
<staticText>
<reportElement x="5" y="10" width="180" height="30" uuid="30e059fd-caed-4e67-a4f6-d06f2897ac59"/>
<textElement>
<font fontName="Times New Roman" size="14" isBold="true" isUnderline="true"/>
</textElement>
<text><![CDATA[Transations]]></text>
</staticText>
</band>
</title>
<columnHeader>
<band height="44" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="160" height="30" uuid="344e0833-c92a-47bf-bece-162b5ac7e52b">
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<text><![CDATA[Date]]></text>
</staticText>
<staticText>
<reportElement x="166" y="0" width="160" height="30" uuid="9bf82277-53b7-4244-aae9-84cf310e6d94">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<text><![CDATA[Additions]]></text>
</staticText>
<rectangle>
<reportElement x="0" y="30" width="490" height="1" uuid="45244617-f10e-4867-bc84-71aa0c42649b"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</rectangle>
<staticText>
<reportElement x="330" y="0" width="160" height="30" uuid="68c554b4-0d79-4236-9e3f-db1b5dd19f7f">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<text><![CDATA[Encashments]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="40" splitType="Stretch">
<textField pattern="dd-MM-yyyy">
<reportElement x="2" y="10" width="158" height="30" uuid="e2ab3765-dd44-4f8d-aedb-d411cce30384">
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{Transaction_TimeStamp}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="166" y="10" width="160" height="30" uuid="bb3baa95-bf15-4462-bb59-3461b1f4e1c7">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{Additions}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="330" y="10" width="160" height="30" uuid="c625f008-1390-4245-8035-9bdc98c21d79">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textFieldExpression><![CDATA[$F{Encashments}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>
의 코드인가?