danbecvel Posted July 20, 2016 Share Posted July 20, 2016 Hi, I have an element list (students) into another element list (pages). For each 'page' it always must to show the same list of students. I got the list of students only for the first instance of 'page'.My code: <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 --><!-- 2016-07-20T10:20:14 --><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="trainingCourseAttendanceReport" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f3981557-1ce2-489f-9060-f047ac62b0a3"><property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/><subDataset name="pages" uuid="3d9b3e98-7f2a-4ca1-ba82-ff97c31a53f8"><parameter name="logo" class="java.io.InputStream"/><parameter name="comp_name" class="java.lang.String"/><parameter name="comp_cif" class="java.lang.String"/><parameter name="courseActionName" class="java.lang.String"/><parameter name="courseName" class="java.lang.String"/><parameter name="courseDateIni" class="java.lang.String"/><parameter name="courseDateEnd" class="java.lang.String"/><parameter name="courseTrainer" class="java.lang.String"/><parameter name="students" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/><queryString><![CDATA[]]></queryString><field name="numberSession" class="java.lang.Integer"><fieldDescription><![CDATA[]]></fieldDescription></field><field name="day" class="java.lang.String"/><field name="session" class="java.lang.String"/><field name="startHour" class="java.lang.String"/><field name="endHour" class="java.lang.String"><fieldDescription><![CDATA[]]></fieldDescription></field></subDataset><subDataset name="students" uuid="9e373d3b-b268-43c6-ac38-d511c9cac2b5"><property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/><queryString><![CDATA[]]></queryString><field name="number" class="java.lang.Integer"/><field name="surname" class="java.lang.String"/><field name="name" class="java.lang.String"/><field name="ind" class="java.lang.String"><fieldDescription><![CDATA[]]></fieldDescription></field></subDataset><queryString><![CDATA[]]></queryString><background><band splitType="Stretch"/></background><title><band splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/></band></title><pageHeader><band splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/></band></pageHeader><columnHeader><band splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/></band></columnHeader><detail><band height="800" splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/><componentElement><reportElement x="0" y="0" width="555" height="415" uuid="d313cb27-f323-4a3e-b895-e02139ddaae8"><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Pages"/><property name="com.jaspersoft.studio.unit.CONTENTS.height" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical"><datasetRun subDataset="pages" uuid="6e25c28c-d449-4621-9276-0e09152a0740"><datasetParameter name="logo"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "logo" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="comp_name"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "comp_name" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="comp_cif"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "comp_cif" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="courseActionName"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "courseActionName" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="courseName"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "courseName" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="courseDateIni"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "courseDateIni" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="courseDateEnd"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "courseDateEnd" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="courseTrainer"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "courseTrainer" )]]></datasetParameterExpression></datasetParameter><datasetParameter name="students"><datasetParameterExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "students" )]]></datasetParameterExpression></datasetParameter><dataSourceExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "pages" )]]></dataSourceExpression></datasetRun><jr:listContents height="415" width="555"><frame><reportElement x="0" y="0" width="555" height="95" uuid="9d075d3d-0bf9-4d7e-a9a1-3e1452f30ed5"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><staticText><reportElement x="180" y="0" width="374" height="75" uuid="064c2a41-716b-4ae5-8494-95bedff51107"/><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="SansSerif" size="16"/></textElement><text><![CDATA[CONTROL DE ASISTENCIA]]></text></staticText><line><reportElement x="0" y="90" width="555" height="1" forecolor="#003B5C" uuid="49cbdea5-f9ab-409b-8a72-5327f034d19d"><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement></line><image scaleImage="RetainShape" isUsingCache="true" evaluationTime="Report"><reportElement x="0" y="0" width="170" height="75" uuid="32ee8df8-8bca-4705-ba5f-bd246410a552"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><imageExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "logo" )]]></imageExpression></image></frame><frame><reportElement x="0" y="95" width="555" height="55" uuid="0b253356-0e55-4331-9d5f-be4684fa2f10"><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><box><topPen lineWidth="1.0"/><leftPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><frame><reportElement x="0" y="0" width="555" height="22" uuid="f440c5b2-7bd4-42e8-99d2-913c1dbe5fa5"><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><rectangle><reportElement x="0" y="0" width="555" height="22" uuid="06b68c02-2a64-4377-864a-e3f14f0867ba"><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement></rectangle><line><reportElement x="80" y="0" width="1" height="22" uuid="8ed800a8-73e0-4300-9983-26374198ccc5"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/></reportElement><graphicElement><pen lineWidth="0.5"/></graphicElement></line><staticText><reportElement x="0" y="0" width="80" height="21" forecolor="#000000" uuid="0da68a0d-4195-46ab-944d-7aaa7045b9a8"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><textElement textAlignment="Center" verticalAlignment="Middle"><font size="9"/></textElement><text><![CDATA[OPCIÓN A]]></text></staticText><textField><reportElement x="80" y="0" width="475" height="21" forecolor="#000000" uuid="6490727a-9f84-49cb-afd4-79a6ee7010d7"><property name="com.jaspersoft.studio.unit.x" 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.width" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Middle"><font size="9"/><paragraph leftIndent="5"/></textElement><textFieldExpression><![CDATA["EMPRESA BONIFICADA: "+ $P{REPORT_PARAMETERS_MAP}.get( "comp_name" )+" CIF: " + $P{REPORT_PARAMETERS_MAP}.get( "comp_cif" )]]></textFieldExpression></textField></frame><frame><reportElement x="0" y="22" width="555" height="33" uuid="362c454b-81b5-4a62-b059-e283ff3cb03e"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><rectangle><reportElement x="0" y="0" width="555" height="33" uuid="35f9c983-bb62-489b-a9ba-138fb49732f0"><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement></rectangle><line><reportElement x="80" y="0" width="1" height="33" uuid="a98235f1-c8b9-48ba-a80b-b61205fc1cc3"><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="0.5"/></graphicElement></line><staticText><reportElement x="0" y="0" width="80" height="32" forecolor="#000000" uuid="6d49e6b6-19b8-4d41-9951-08907f27694f"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><textElement textAlignment="Center" verticalAlignment="Middle"><font size="9"/></textElement><text><![CDATA[OPCIÓN B]]></text></staticText><textField><reportElement x="80" y="0" width="475" height="17" forecolor="#000000" uuid="b41c12b2-9cad-4c42-abd5-3440045db6f1"><property name="com.jaspersoft.studio.unit.x" 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.width" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Middle"><font size="9"/><paragraph leftIndent="5"/></textElement><textFieldExpression><![CDATA["EMPRESA ORGANIZADORA: "+ $P{REPORT_PARAMETERS_MAP}.get( "comp_name" )+" CIF: " +$P{REPORT_PARAMETERS_MAP}.get( "comp_cif" )]]></textFieldExpression></textField><textField><reportElement x="80" y="17" width="475" height="16" forecolor="#000000" uuid="54517b69-e6fa-47eb-ac28-2a3991325798"><property name="com.jaspersoft.studio.unit.x" 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.width" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Middle"><font size="9"/><paragraph leftIndent="5"/></textElement><textFieldExpression><![CDATA["AGRUPACIÓN: "]]></textFieldExpression></textField></frame></frame><staticText><reportElement x="5" y="152" width="540" height="10" forecolor="#595959" uuid="8fc6ba59-a5a3-4563-aa43-733d900bfd22"><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><textElement><font size="6" isItalic="true"/></textElement><text><![CDATA[(Se seleccionará uno de los apartados anteriores dependiendo del perfil con el que se haya accedido al Sistema telemático de Gestión de Acciones Formativas en las Empresas)]]></text></staticText><frame><reportElement x="0" y="165" width="555" height="110" uuid="264925e3-03a0-4492-9b92-d28edf78eb8a"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><leftPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><rectangle><reportElement x="0" y="0" width="555" height="110" uuid="15045d43-8058-451b-9b40-57ce8e10abc8"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement></rectangle><textField><reportElement x="0" y="0" width="555" height="17" forecolor="#000000" uuid="5886e8d1-fd9d-4d96-9bb3-580e34fd8834"><property name="com.jaspersoft.studio.unit.x" 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.width" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Middle"><font size="9"/><paragraph leftIndent="10"/></textElement><textFieldExpression><![CDATA["DENOMINACIÓN DE LA ACCIÓN FORMATIVA: "+ $P{REPORT_PARAMETERS_MAP}.get( "courseActionName" )]]></textFieldExpression></textField><textField><reportElement x="0" y="17" width="555" height="17" forecolor="#000000" uuid="920b14f3-262d-44e1-ad40-d814f14f538c"><property name="com.jaspersoft.studio.unit.x" 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.width" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Middle"><font size="9"/><paragraph leftIndent="10"/></textElement><textFieldExpression><![CDATA["GRUPO: "+ $P{REPORT_PARAMETERS_MAP}.get( "courseName" ) + " FECHA DE INICIO: " + $P{REPORT_PARAMETERS_MAP}.get( "courseDateIni" )+" FECHA DE FIN: "+$P{REPORT_PARAMETERS_MAP}.get( "courseDateEnd" )]]></textFieldExpression></textField><textField><reportElement x="0" y="34" width="555" height="17" forecolor="#000000" uuid="be07726b-e157-43f2-813a-593e650f92d4"><property name="com.jaspersoft.studio.unit.x" 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.width" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Middle"><font size="9"/><paragraph leftIndent="10"/></textElement><textFieldExpression><![CDATA["FORMADOR/RESPONSABLE DE FORMACIÓN: "+$P{REPORT_PARAMETERS_MAP}.get( "courseTrainer" )]]></textFieldExpression></textField><textField><reportElement x="0" y="51" width="555" height="17" forecolor="#000000" uuid="dec3c385-ffbb-487c-a6b7-5188d84a0a26"><property name="com.jaspersoft.studio.unit.x" 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.width" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Middle"><font size="9"/><paragraph leftIndent="10"/></textElement><textFieldExpression><![CDATA["SESIÓN Nº: " + $F{numberSession} + " FECHA: " + $F{day} + " MAÑANA/TARDE: " + $F{session} + " HORARIO: " + $F{startHour} + " A " + $F{endHour}]]></textFieldExpression></textField><staticText><reportElement key="" mode="Transparent" x="10" y="75" width="250" height="35" forecolor="#000000" uuid="f492fd38-00ec-4dd1-941c-d09170d93316"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><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="8"/></textElement><text><![CDATA[Firmado: (Formador/Resp. Formación)]]></text></staticText></frame><frame><reportElement key="" x="0" y="285" width="555" height="45" uuid="06562929-edd3-42cf-8b59-577da2f47b32"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><leftPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><frame><reportElement x="0" y="0" width="555" height="25" uuid="e7f56419-987a-4718-9a51-f25dacc94e12"/><box><topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/></box><staticText><reportElement x="0" y="0" width="175" height="25" uuid="a1150827-790d-4203-afe4-f694c35464bd"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font size="8" isBold="false"/><paragraph leftIndent="5"/></textElement><text><![CDATA[APELLIDOS]]></text></staticText><staticText><reportElement x="175" y="0" width="60" height="25" uuid="4eb2d7e0-66e6-4f68-96d1-aec950157ea8"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font size="8" isBold="false"/><paragraph leftIndent="5"/></textElement><text><![CDATA[NOMBRE]]></text></staticText><staticText><reportElement x="235" y="0" width="60" height="25" uuid="93d71bd6-da46-4109-bbc2-538e379d7153"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font size="8" isBold="false"/><paragraph leftIndent="5"/></textElement><text><![CDATA[N.I.F.]]></text></staticText><staticText><reportElement x="295" y="0" width="100" height="25" uuid="fc10d792-bfab-4f80-aa38-af834afb4782"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font size="8" isBold="false"/><paragraph leftIndent="5"/></textElement><text><![CDATA[FIRMAS]]></text></staticText><staticText><reportElement x="395" y="0" width="160" height="25" uuid="2fbdeaa8-ca69-4e73-816d-34bf8d1b5881"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font size="8" isBold="false"/><paragraph leftIndent="5"/></textElement><text><![CDATA[OBSERVACIONES]]></text></staticText></frame><componentElement><reportElement x="0" y="25" width="555" height="20" uuid="e4408337-5df2-4d7b-a02c-82c620440443"><property name="net.sf.jasperreports.export.headertoolbar.table.name" value="Students"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><jr:list printOrder="Vertical"><datasetRun subDataset="students" uuid="d2eff648-79d8-4349-9798-28bb15e6a3fa"><dataSourceExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get( "students" )]]></dataSourceExpression><returnValue fromVariable="$P{REPORT_PARAMETERS_MAP}.get( "students" )" toVariable="$P{REPORT_PARAMETERS_MAP}.get( "students" )"/></datasetRun><jr:listContents height="20" width="555"><frame><reportElement x="0" y="0" width="555" height="20" uuid="08ce5da0-0bfa-4b34-9715-5f4e6b19a72f"><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textField><reportElement x="0" y="0" width="15" height="20" uuid="29baf403-676c-43fc-b7bf-8b708494c503"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font size="7"/></textElement><textFieldExpression><![CDATA[$F{number}]]></textFieldExpression></textField><textField><reportElement x="15" y="0" width="160" height="20" uuid="63bc5a02-675b-4b8f-b5cc-958e0b1b2848"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement verticalAlignment="Middle"><font size="7"/><paragraph leftIndent="5"/></textElement><textFieldExpression><![CDATA[$F{surname}]]></textFieldExpression></textField><textField><reportElement x="175" y="0" width="60" height="20" uuid="907b1135-dae4-410f-a686-d24a71eeb142"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement verticalAlignment="Middle"><font size="7"/><paragraph leftIndent="5"/></textElement><textFieldExpression><![CDATA[$F{name}]]></textFieldExpression></textField><textField><reportElement x="235" y="0" width="60" height="20" uuid="c7999171-bb40-496c-b0e3-498c82e3b836"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="0.5"/><leftPen lineWidth="0.5"/><bottomPen lineWidth="0.5"/><rightPen lineWidth="0.5"/></box><textElement verticalAlignment="Middle"><font size="7"/><paragraph leftIndent="5"/></textElement><textFieldExpression><![CDATA[$F{ind}]]></textFieldExpression></textField><line><reportElement x="395" y="0" width="1" height="20" uuid="5f6a7347-0f26-4db7-8d04-35ba3c7a7a85"><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><graphicElement><pen lineWidth="0.5"/></graphicElement></line></frame></jr:listContents></jr:list></componentElement></frame><frame><reportElement positionType="Float" x="0" y="340" width="555" height="75" uuid="06e53805-8e89-416a-a931-04bbabbcc436"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><leftPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><staticText><reportElement x="0" y="0" width="192" height="23" uuid="21231cb1-1408-48ab-a0fd-5ccfce950950"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><textElement><font size="8"/><paragraph leftIndent="5"/></textElement><text><![CDATA[OBSERVACIONES GENERALES:]]></text></staticText></frame></jr:listContents></jr:list></componentElement></band></detail><columnFooter><band splitType="Stretch"/></columnFooter><pageFooter><band splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/></band></pageFooter><summary><band splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/></band></summary></jasperReport> Link to comment Share on other sites More sharing options...
lucianc Posted July 20, 2016 Share Posted July 20, 2016 You are using $P{REPORT_PARAMETERS_MAP}.get( "students" ) as data source for the list, which means that a single data source object is used several times. That will not work because the data source gets consumed the first time it is used.You'll need to create a fresh data source instance each time (for instance by putting a list in the parameters map and using new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((List) $P{REPORT_PARAMETERS_MAP}.get("studentsList")) as list data source, or if the data source implements JRRewindableDataSource find a way to call moveFirst() before reusing the data source.Regards,Lucian Link to comment Share on other sites More sharing options...
danbecvel Posted July 20, 2016 Author Share Posted July 20, 2016 Your idea works!The solution:1. A new JRBeanCollectionDataSource property added to de Class Page created always with a freshing 'new JRBeanCollectionDataSource': public class Page {Integer numberSession;String day;String session;// Mañana/TardeString startHour;String endHour;JRBeanCollectionDataSource students;...} 2. The list students changed for a subreport. The datasource for this subreport is the new field $F{students}Thank you very much Lucian. 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