rainman
rainman

Reputation: 2659

Add new page in the same report JasperReports

I am creating a JasperReports report, based on XML, my project creates PDF report based on XML. For the one I am working on, I have one filled page and I need to create an other page does anyone know how can I do this?

This is my code:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0  -->
<!-- 2016-01-15T11:53:18 -->
<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="PMT_ACCEPTACIO_CONCESSIO" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="ApplicationResourcesPMT" uuid="9dbc26c8-a00f-4581-8e6f-34ce437d5bae">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="ACCEPTACIO CONCESSIO.xml"/>
    <style name="table">
        <box>
            <pen lineWidth="1.0" lineColor="#000000"/>
        </box>
    </style>
    <style name="table_TH" mode="Opaque" backcolor="#F0F8FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="table_CH" mode="Opaque" backcolor="#BFE1FF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <pen lineWidth="0.5" lineColor="#000000"/>
        </box>
    </style>
    <style name="color_letra" forecolor="#891536" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
    <style name="color_letra_bold" forecolor="#891536" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
    <subDataset name="Table Dataset 1" uuid="79115cc2-75b9-4758-8619-e16b30a9863f"/>
    <parameter name="ENTRY_DATE" class="java.util.Date" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <parameter name="EFECTE_DATE" class="java.util.Date" isForPrompting="false">
        <defaultValueExpression><![CDATA[]]></defaultValueExpression>
    </parameter>
    <parameter name="PATH_LOGO" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["C:\\diba\\tools\\iReport-3.7.6\\exemples\\logo.gif"]]></defaultValueExpression>
    </parameter>
    <parameter name="NUM_REGISTRE" class="java.lang.String" isForPrompting="false"/>
    <queryString language="xPath">
        <![CDATA[/RebutEntrada/PeticioEntrada/dades/contacteTecnic/horari]]>
    </queryString>
    <field name="nomEns" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/dadesSolicitant/nomEns]]></fieldDescription>
    </field>
    <field name="Nom" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/InformacioPeticio/Receptor/Nom]]></fieldDescription>
    </field>
    <field name="nif" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/dadesSolicitant/nif]]></fieldDescription>
    </field>
    <field name="NumeroRegistre" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/NumeroRegistre]]></fieldDescription>
    </field>
    <field name="DataExpedicio" class="java.util.Date">
        <fieldDescription><![CDATA[/RebutEntrada/DataExpedicio]]></fieldDescription>
    </field>
    <field name="DataEntrada" class="java.util.Date">
        <fieldDescription><![CDATA[/RebutEntrada/DataEntrada]]></fieldDescription>
    </field>
    <field name="nomCognoms" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/contacteTecnic/nomCognoms]]></fieldDescription>
    </field>
    <field name="telefon" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/contacteTecnic/telefon]]></fieldDescription>
    </field>
    <field name="carrec" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/contacteTecnic/carrec]]></fieldDescription>
    </field>
    <field name="eMail" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/contacteTecnic/eMail]]></fieldDescription>
    </field>
    <field name="horari" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/contacteTecnic/horari]]></fieldDescription>
    </field>
    <field name="nomArea" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/nomArea]]></fieldDescription>
    </field>
    <field name="programa" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/programa]]></fieldDescription>
    </field>
    <field name="nomPrograma" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/nomPrograma]]></fieldDescription>
    </field>
    <field name="nomRecurso" class="java.lang.String">
        <fieldDescription><![CDATA[/RebutEntrada/PeticioEntrada/dades/nomRecurso]]></fieldDescription>
    </field>
    <title>
        <band height="134" splitType="Stretch">
            <rectangle>
                <reportElement x="365" y="1" width="190" height="115" forecolor="#990000" uuid="1e3e4674-22f1-4cfc-a51e-5b1dc0d3d067"/>
                <graphicElement>
                    <pen lineWidth="0.5"/>
                </graphicElement>
            </rectangle>
            <textField>
                <reportElement style="color_letra_bold" x="373" y="7" width="100" height="12" uuid="5d05244d-d0b8-44b9-a7bc-65f1a10a4d25"/>
                <textElement verticalAlignment="Top" markup="none">
                    <font size="8" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{title_num_entrada}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="373" y="33" width="100" height="12" uuid="5099d7f3-8816-4090-8810-ae2581900d4e"/>
                <textElement verticalAlignment="Top" markup="none">
                    <font size="8" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{title_unit_destination}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="373" y="59" width="100" height="12" uuid="4b9879db-c98e-42f2-80b9-fc77a8d1a443"/>
                <textElement verticalAlignment="Top" markup="none">
                    <font size="8" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{title_entry_date}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="373" y="85" width="100" height="12" uuid="b7b1f328-64a3-4272-9918-6d83d4e08338"/>
                <textElement verticalAlignment="Top" markup="none">
                    <font size="8" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{title_effect_date}]]></textFieldExpression>
            </textField>
            <image scaleImage="RetainShape">
                <reportElement mode="Transparent" x="5" y="0" width="175" height="42" uuid="152e6978-b65f-4309-8c0a-d5f0d3d48832"/>
                <imageExpression><![CDATA[new java.io.File($P{PATH_LOGO})]]></imageExpression>
            </image>
            <textField>
                <reportElement x="373" y="45" width="175" height="14" uuid="21fe8687-5439-454d-8ed1-9eb9b05d2a54"/>
                <textFieldExpression><![CDATA[$F{Nom}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="373" y="19" width="175" height="14" uuid="56044d30-036b-4033-8611-0d6af666decd">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{NumeroRegistre}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="373" y="71" width="175" height="14" uuid="8bae7c9c-23f5-4b3d-b9e8-f3e1cfd513d0">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{DataEntrada}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="373" y="97" width="175" height="14" uuid="6e2e34da-5b9b-48d7-87e8-552aeeb47619">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{DataExpedicio}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="50" y="6" width="100" height="36" forecolor="#891536" uuid="bd16dd13-8b6c-4923-875a-4d96a284f08a"/>
                <textElement>
                    <font size="12"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{diputaciu00F3_barcelona}]]></textFieldExpression>
            </textField>
        </band>
    </title>
    <pageHeader>
        <band height="668" splitType="Stretch">
            <printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression>
            <rectangle>
                <reportElement style="color_letra" x="4" y="30" width="550" height="32" uuid="a1f6da40-9034-4eb6-882c-930df67b09a5"/>
                <graphicElement>
                    <pen lineWidth="1.0"/>
                </graphicElement>
            </rectangle>
            <line>
                <reportElement x="380" y="30" width="1" height="32" forecolor="#891536" uuid="b9c982de-bd10-44f4-bb99-32c81b30ff45"/>
            </line>
            <textField>
                <reportElement style="color_letra_bold" x="9" y="34" width="150" height="13" forecolor="#891536" uuid="78af054a-c391-4c55-a55f-9312814c79a8">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{nom_ens}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="9" y="47" width="250" height="13" uuid="18172a16-8f77-4193-afd0-a8b010cbe884">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{nomEns}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="385" y="34" width="150" height="13" forecolor="#891536" uuid="83977d62-035a-4f4b-beaf-56434d45a476">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{nif}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="385" y="47" width="158" height="13" uuid="abffce01-9755-48f3-9c01-c509ee34d50e">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{nif}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="4" y="80" width="412" height="30" forecolor="#891536" uuid="81b2726c-8f88-43a5-8883-9c6d10ae92de"/>
                <textElement>
                    <font size="16"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{contact_tecnic_ens}]]></textFieldExpression>
            </textField>
            <rectangle>
                <reportElement key="" style="color_letra" mode="Opaque" x="4" y="110" width="551" height="32" forecolor="#891536" uuid="e7af4904-d8a6-4f36-8703-b9f4d3b72d33">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
                <graphicElement>
                    <pen lineWidth="1.0"/>
                </graphicElement>
            </rectangle>
            <line>
                <reportElement x="381" y="110" width="1" height="33" forecolor="#891536" uuid="c1190c18-0604-425b-b9d3-eb16b37ad764">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
            </line>
            <textField>
                <reportElement style="color_letra_bold" x="9" y="112" width="150" height="13" forecolor="#891536" uuid="6ea962ec-e091-4ec9-a766-05ef850f6db0">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{personal_information_name_surname}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="9" y="126" width="230" height="13" uuid="71f1d5ec-84e4-4406-9ace-528d03810aca">
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{nomCognoms}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="385" y="114" width="150" height="13" forecolor="#891536" uuid="4735bbc4-d931-45dc-a118-e768edfcd060">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{personal_information_phone}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="385" y="129" width="158" height="13" uuid="b760bd9b-6060-4bdc-8e18-a66d89084c73">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{telefon}]]></textFieldExpression>
            </textField>
            <rectangle>
                <reportElement x="4" y="142" width="551" height="68" forecolor="#891536" uuid="e832d7af-7fd2-4725-98d1-26a17ef7d01e">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
            </rectangle>
            <textField>
                <reportElement style="color_letra_bold" x="9" y="142" width="150" height="13" forecolor="#891536" uuid="9aa92d1b-e117-4a36-9282-b1503d7df7ca">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{carrec}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="9" y="157" width="230" height="13" uuid="e74dc320-3cf6-47fe-9977-fa82f2650735">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{carrec}]]></textFieldExpression>
            </textField>
            <line>
                <reportElement x="381" y="140" width="1" height="69" forecolor="#891536" uuid="215e64db-4a44-48b8-9f1f-05a823e1dc68">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
            </line>
            <textField>
                <reportElement style="color_letra_bold" x="385" y="147" width="150" height="13" forecolor="#891536" uuid="315b576e-fab5-4fdf-b8e1-57050752e4e3">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{personal_information_email}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="385" y="161" width="158" height="13" uuid="6c5603b6-bb51-4ae5-b4b6-29454a198ed1">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{eMail}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="385" y="174" width="150" height="13" forecolor="#891536" uuid="daf49650-f884-43ec-8d1e-aee9c1c2c036">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{tecnic_ens_horari}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="385" y="187" width="158" height="13" uuid="d13a4d2b-6ad8-4807-b351-3cdbbb7ed66c">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{horari}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="4" y="230" width="551" height="95" forecolor="#000000" uuid="467572eb-0761-4914-9411-913bd78f6f6b">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{proteccio_dades}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement style="color_letra_bold" mode="Opaque" x="4" y="328" width="434" height="30" forecolor="#891536" uuid="539eabb4-f0aa-47e2-8da6-56eb86b17b76">
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement>
                    <font size="16"/>
                </textElement>
                <text><![CDATA[Referent a la sol·licitud ]]></text>
            </staticText>
            <rectangle>
                <reportElement x="4" y="360" width="551" height="32" forecolor="#891536" uuid="a595ae34-9538-41ae-8d65-d9c45354a775">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
            </rectangle>
            <textField>
                <reportElement x="9" y="360" width="150" height="13" forecolor="#891536" uuid="5010c18a-0903-4c8c-8ef0-5a0b6ca4d0bc">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{registre_solicitud_origen}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="9" y="375" width="200" height="13" uuid="71066559-93cb-4efd-be76-c0c6365464a5">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="4" y="420" width="412" height="30" forecolor="#891536" uuid="56d67d15-09c5-4a24-ba22-fa9421ed6bb0">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
                <textElement>
                    <font size="16"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{dades_basiques_solicitud}]]></textFieldExpression>
            </textField>
            <rectangle>
                <reportElement style="color_letra" x="4" y="452" width="551" height="32" uuid="6cbd38a1-9f23-4850-bf87-4e9cd4cd03ce">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <graphicElement>
                    <pen lineWidth="1.0"/>
                </graphicElement>
            </rectangle>
            <textField>
                <reportElement x="9" y="455" width="150" height="13" forecolor="#891536" uuid="46d54262-84c0-4bfe-a670-7841bd1e8e29">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{area}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="9" y="470" width="169" height="13" uuid="a801c724-3b0d-4a19-b933-8fd0570f9486">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{nomArea}]]></textFieldExpression>
            </textField>
            <line>
                <reportElement x="380" y="452" width="1" height="31" forecolor="#891536" uuid="ba690d7f-0e2d-4072-bbca-3d3e914cc46f">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                </reportElement>
            </line>
            <line>
                <reportElement x="180" y="453" width="1" height="31" forecolor="#891536" uuid="1e1f0113-d414-4482-8e71-1f99bbf67557">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
            </line>
            <textField>
                <reportElement x="185" y="455" width="150" height="13" forecolor="#891536" uuid="2c989681-75de-4f48-859e-c45f57797f07">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{programa }]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="185" y="470" width="169" height="13" uuid="99e773e1-3ea2-4753-81f8-c0b92948763c">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{nomPrograma}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="385" y="455" width="150" height="13" forecolor="#891536" uuid="5bc092e2-314e-491a-ad56-540524c081c6">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{recurs}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="385" y="470" width="169" height="13" uuid="ecedafc4-fbf2-4cc3-a974-696e18ea4395">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$F{nomRecurso}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="4" y="518" width="551" height="32" forecolor="#000000" uuid="1a8e1f5e-90ea-456c-9be6-11045b2c639f">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{solicitud}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="color_letra_bold" x="422" y="600" width="94" height="30" forecolor="#891536" uuid="79f92540-225a-45b3-8f61-b9ad509ae77c">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Right"/>
                <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Report">
                <reportElement style="color_letra_bold" x="515" y="600" width="94" height="30" forecolor="#891536" uuid="5c369a07-a420-4490-ae79-a4e22ce288b3">
                    <property name="com.jaspersoft.studio.unit.x" value="pixel"/>
                    <property name="com.jaspersoft.studio.unit.y" value="pixel"/>
                </reportElement>
                <textElement textAlignment="Left"/>
                <textFieldExpression><![CDATA[" of " +  $V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageHeader>
</jasperReport>

Upvotes: 1

Views: 729

Answers (1)

Petter Friberg
Petter Friberg

Reputation: 21710

You have all (your one page) in the

  • title band (this is showed once in the beginning of the report).
  • pageHeader band (this is showed on top of the all pages)

Your only solution is to add the summary band (this is showed end of report).

Make sure you have this attributes set on your jasperReport tag

  • isSummaryNewPage="true", make sure you get it on new page
  • isSummaryWithPageHeaderAndFooter="false", avoid the pageHeader (you will get overflow since both your pageHeader and your summary can't fit in on page).

My suggestion in this two page report is that you move the pageHeader and title content to the detail band (this is the band that repeat's on datasource).

If you want to show only first record (1 page) set REPORT_MAX_COUNT to 1

To understand more about the different report sections see jasper_report_sections

Upvotes: 1

Related Questions