LirikGueorgue Posted February 22, 2018 Share Posted February 22, 2018 Dear Friends,I'm going to create master dummy report with two separate subreports to export them in one excel file with two separate sheets for each report.Both subreports works fine separated, but when I put them in my dummy master report it does not work. I have iReport v 5.6.0. My final config is that subreports are in to separated group footer.For each group I put " isStartNewPage="true"", I created third dummy group with page break insite, but always the report is generated in one page at all.On the master report I checked "Ignore pagination", on subreport it is market to false. I read tones of manuals and suggestion, but still have no idea how to split both subreports in two pages.Bellow is my master report XML, any advice will be helpful!---<?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="report3" language="groovy" pageWidth="842" pageHeight="1000" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isIgnorePagination="true" uuid="686510a1-bfc0-4e3c-aac9-84dbd3b0a66b"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="true"/> <property name="net.sf.jasperreports.export.xls.sheet.names.{arbitrary_name}" value="PlanedVsRegisted/RegisteredNewTransf"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["D:\temp\iReport-5.6.0\iReport-5.6.0\"]]></defaultValueExpression> </parameter> <queryString language="SQL"> <![CDATA[select to_char(sysdate,'dd.mm.yyyy hh24:mi:ss') from dual]]> </queryString> <field name="TO_CHAR(SYSDATE,'DD.MM.YYYYHH24:MI:SS')" class="java.lang.String"/> <variable name="REPORT_PAGE" class="java.lang.Integer" resetType="None" incrementType="Page"> <variableExpression><![CDATA[$V{PAGE_NUMBER}]]></variableExpression> <initialValueExpression><![CDATA[0]]></initialValueExpression> </variable> <group name="Report2" isStartNewPage="true"> <groupExpression><![CDATA[$F{TO_CHAR(SYSDATE,'DD.MM.YYYYHH24:MI:SS')}]]></groupExpression> <groupHeader> <band/> </groupHeader> <groupFooter> <band height="25" splitType="Stretch"> <break> <reportElement x="0" y="0" width="800" height="1" uuid="5d5b64bd-22c4-4b00-8988-7f67f8042007"/> </break> <subreport> <reportElement x="0" y="2" width="800" height="20" uuid="1d206b57-b7db-4ec6-b06f-ccbb07666b21"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "ReportedBulstats.jasper"]]></subreportExpression> </subreport> </band> </groupFooter> </group> <group name="Dummy" isStartNewPage="true"> <groupExpression><![CDATA[$F{TO_CHAR(SYSDATE,'DD.MM.YYYYHH24:MI:SS')}]]></groupExpression> <groupHeader> <band height="5"/> </groupHeader> <groupFooter> <band height="10" splitType="Stretch"> <break> <reportElement x="0" y="0" width="800" height="1" uuid="13748e21-f3f3-4c7d-be43-0d83d89cec5b"/> </break> <staticText> <reportElement positionType="Float" x="0" y="2" width="100" height="6" uuid="d4a56eda-e540-4677-83fd-695d5ce1032a"/> <text><![CDATA[static text]]></text> </staticText> </band> </groupFooter> </group> <group name="Report1" isStartNewPage="true"> <groupExpression><![CDATA[$F{TO_CHAR(SYSDATE,'DD.MM.YYYYHH24:MI:SS')}]]></groupExpression> <groupHeader> <band/> </groupHeader> <groupFooter> <band height="25" splitType="Stretch"> <subreport> <reportElement x="0" y="0" width="800" height="20" uuid="135d4e05-58de-493e-abd4-5ffdf81ca2cf"> <property name="net.sf.jasperreports.export.xls.break.after.row" value="true"/> </reportElement> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "RegisteredVsPlaned.jasper"]]></subreportExpression> </subreport> </band> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title>--- Link to comment Share on other sites More sharing options...
Friendly User Posted February 28, 2018 Share Posted February 28, 2018 Master report Ignore Pagination overrides the report pagination properties in subreports. I would recommend using Book Report instead in this situation. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now