JasperReport - Problems While Walking list

1

I am generating a report through JasperReport, but I am having a particular problem with a list, which for certain data traces the values repeating the value of the last occurrence.

SubDataSet the values that print me incorrectly in this case is:

isTaskUsuallyPerInjured<p>
<subDataset name="PersonalAccidentDataset" uuid="ef68c793-2071-4e0e-9b26-99935588c08b">
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="nameOfMedicalServiceThatPayAtention" class="java.lang.String"/>
    <field name="amputationName" class="java.lang.String"/>
    <field name="injuredPart" class="java.lang.String"/>
    <field name="isTaskUsuallyPerInjured" class="java.lang.Boolean"/>
    <field name="isPolicyInterventionPerInjured" class="java.lang.Boolean"/>
    <field name="isHadSomeAmputation" class="java.lang.Boolean"/>
    <field name="personInsured" class="com.sysone.model.policy.PersonInsured"/>
    <field name="injuredType" class="com.sysone.model.claim.InjuryType"/>
</subDataset>

List

<componentElement>
    <reportElement positionType="Float" x="1" y="50" width="500" height="200" isRemoveLineWhenBlank="true" uuid="faa55e29-96f0-47db-9039-6943ce41131e"/>
    <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="PersonalAccidentDataset" uuid="f918a670-2e68-4454-b093-f468fc370594">
            <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{personalAccidents})]]></dataSourceExpression>
        </datasetRun>
        <jr:listContents height="200" width="500">
            <textField isBlankWhenNull="true">
                <reportElement positionType="Float" x="70" y="29" width="150" height="14" uuid="94165ae0-e807-490f-8737-29d65e0d74f1">
                    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                </reportElement>
                <box rightPadding="2">
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement>
                    <font isUnderline="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{personInsured}.getPerson().getLastName()]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement positionType="Float" x="10" y="29" width="60" height="14" uuid="cc5e1f82-72cd-4cff-bdb3-1816808479cb"/>
                <textElement verticalAlignment="Bottom">
                    <font isStrikeThrough="false"/>
                </textElement>
                <text><![CDATA[Apellido:]]></text>
            </staticText>
            <line>
                <reportElement positionType="Float" x="10" y="22" width="490" height="1" uuid="8fcb1a87-2fb6-4ac8-bb2d-0af9904b03d2"/>
            </line>
            <textField>
                <reportElement x="10" y="9" width="197" height="14" uuid="1936d56e-0f81-482e-9718-6024da8039b0"/>
                <textElement>
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA["PERSONA ACCIDENTADA (" + $V{REPORT_COUNT} + ")"]]></textFieldExpression>
            </textField>
            <textField isBlankWhenNull="true">
                <reportElement positionType="Float" x="285" y="30" width="190" height="14" uuid="b3c418c7-3db6-4c63-be4f-19daffbcdd5c"/>
                <box rightPadding="2">
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement>
                    <font isUnderline="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{personInsured}.getPerson().getFirstName()]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement positionType="Float" x="225" y="30" width="60" height="14" uuid="596c717f-49d8-400b-b15f-5434af089a5a"/>
                <textElement verticalAlignment="Bottom">
                    <font isStrikeThrough="false"/>
                </textElement>
                <text><![CDATA[Nombre/s:]]></text>
            </staticText>

            <staticText>
                <reportElement key="staticText-189" positionType="Float" x="10" y="85" width="60" height="15" uuid="d1b796ff-b570-42a3-a38a-459da885cde5"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Bottom">
                    <font size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[Fecha Nac.:]]></text>
            </staticText>
            <textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
                <reportElement key="textField-58" positionType="Float" x="73" y="85" width="127" height="14" uuid="02950676-0c60-4fa5-a0ee-a1405549077a"/>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Bottom">
                    <font size="10" isItalic="false" pdfFontName="Helvetica"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{personInsured}.getPerson().getBirthDate()]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-189" positionType="Float" x="10" y="108" width="87" height="15" uuid="500e2723-dea1-4cee-b471-22207418be6c"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Bottom">
                    <font size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[Tipo de lesión:]]></text>
            </staticText>
            <textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
                <reportElement key="textField-58" positionType="Float" x="110" y="109" width="102" height="14" uuid="c7c53444-98eb-493c-8fd5-b1cbdd995cc9"/>
                <box>
                    <pen lineWidth="0.5"/>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Bottom">
                    <font size="10" isItalic="false" pdfFontName="Helvetica"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{injuredType}.getDescription()]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-129" positionType="Float" x="10" y="130" width="204" height="14" uuid="bdf4f164-c5d0-4770-a021-483da5d58d0b"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Bottom">
                    <font size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[¿Se encontraba realizando tareas laborales?]]></text>
            </staticText>
            <frame>
                <reportElement x="222" y="129" width="14" height="14" uuid="6a447844-f075-4212-834d-80341eae44d0"/>
                <textField evaluationTime="Report" isBlankWhenNull="true">
                    <reportElement key="textField-100" positionType="Float" x="0" y="0" width="14" height="14" uuid="ab04168c-2fc8-40fd-a2a2-bd817b02770c">
                        <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
                    </reportElement>
                    <box>
                        <pen lineWidth="0.75" lineStyle="Solid"/>
                        <topPen lineWidth="0.75" lineStyle="Solid"/>
                        <leftPen lineWidth="0.75" lineStyle="Solid"/>
                        <bottomPen lineWidth="0.75" lineStyle="Solid"/>
                        <rightPen lineWidth="0.75" lineStyle="Solid"/>
                    </box>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font size="10"/>
                    </textElement>
                    <textFieldExpression><![CDATA[($F{isTaskUsuallyPerInjured} ? "X" : "")]]></textFieldExpression>
                </textField>
            </frame>
        </jr:listContents>
    </jr:list>
</componentElement>
    
asked by Gonzalo Zago 21.08.2018 в 19:03
source

0 answers