Jasper Reports - Letzte Daten aus Detailbereich werden in der Variable angezeigt

Joob

Top Contributor
Ich verstehe nicht warum gerade der letzte DetailDatensatz nicht in der Variable [ReportSumPercent] berücksicht wird, obwohl das Feld im SummaryBand ist .
Ich hab mal meinen Bericht angezeigt. Ich habe schon alle möglichen Variationen hinsichte der EvaluationTime probiert, aber keinen Erfolg gehabt.
Alles andere funktioniert einwandfrei.
Warum geht das nicht in Summary müsste doch alles zusammengerechnet werden, oder ?


Java:
<?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="TeacherTestForm1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="444da462-82a7-44f0-985a-9e94e8afe8db">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["C:\\Users\\Jupp\\Documents\\NetBeansProjects\\VTDESKTOP\\build\\resources\\main\\REPORTS\\"]]></defaultValueExpression>
    </parameter>
    <parameter name="SUB_PVA00001" class="java.lang.Object"/>
    <parameter name="SUB_PVA00002" class="java.lang.Object"/>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="courseid" class="java.lang.String">
        <fieldDescription><![CDATA[courseid]]></fieldDescription>
    </field>
    <field name="coursename" class="java.lang.String">
        <fieldDescription><![CDATA[coursename]]></fieldDescription>
    </field>
    <field name="teachertestid" class="java.lang.String">
        <fieldDescription><![CDATA[teachertestid]]></fieldDescription>
    </field>
    <field name="subjectname" class="java.lang.String">
        <fieldDescription><![CDATA[subjectname]]></fieldDescription>
    </field>
    <field name="userid" class="java.lang.String">
        <fieldDescription><![CDATA[userid]]></fieldDescription>
    </field>
    <field name="username" class="java.lang.String">
        <fieldDescription><![CDATA[username]]></fieldDescription>
    </field>
    <field name="ttcontentpva00002" class="java.util.List">
        <fieldDescription><![CDATA[ttcontentpva00002]]></fieldDescription>
    </field>
    <field name="datetest" class="java.lang.String">
        <fieldDescription><![CDATA[datetest]]></fieldDescription>
    </field>
    <field name="ttcontentpva00001" class="java.util.List">
        <fieldDescription><![CDATA[ttcontentpva00001]]></fieldDescription>
    </field>
    <variable name="PVA00001sumPoints" class="java.lang.Integer">
        <variableExpression><![CDATA[$V{PVA00001sumPoints}]]></variableExpression>
    </variable>
    <variable name="PVA00002sumPoints" class="java.lang.Integer">
        <variableExpression><![CDATA[$V{PVA00002sumPoints}]]></variableExpression>
    </variable>
    <variable name="PVA00002sumPointsStudent" class="java.lang.Integer">
        <variableExpression><![CDATA[$V{PVA00002sumPointsStudent}]]></variableExpression>
    </variable>
    <variable name="PVA00001sumPointsStudent" class="java.lang.Integer">
        <variableExpression><![CDATA[$V{PVA00001sumPointsStudent}]]></variableExpression>
    </variable>
    <variable name="ReportSumPercent" class="java.lang.Double" calculation="Sum">
        <variableExpression><![CDATA[100.000 / (($V{PVA00001sumPoints}.doubleValue()) + ($V{PVA00002sumPoints}.doubleValue())) * (($V{PVA00001sumPointsStudent}.doubleValue()) + ($V{PVA00002sumPointsStudent}.doubleValue()))]]></variableExpression>
    </variable>
    <background>
        <band splitType="Stretch"/>
    </background>
    <detail>
        <band height="157" splitType="Stretch">
            <break>
                <reportElement x="0" y="4" width="101" height="1" uuid="a4bb62a8-1072-4575-be30-83da146c5513"/>
            </break>
            <subreport isUsingCache="false">
                <reportElement positionType="Float" x="3" y="114" width="536" height="0" uuid="2027a4eb-d8bd-4490-84e7-35a375a6e6fe"/>
                <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{ttcontentpva00001})]]></dataSourceExpression>
                <returnValue subreportVariable="SumPoints" toVariable="PVA00001sumPoints"/>
                <returnValue subreportVariable="SumPointsStudent" toVariable="PVA00001sumPointsStudent"/>
                <subreportExpression><![CDATA[$P{SUB_PVA00001}]]></subreportExpression>
            </subreport>
            <subreport isUsingCache="false">
                <reportElement positionType="Float" x="2" y="119" width="536" height="0" uuid="7a0e8ee4-925a-42ab-877e-f897fa4fdf0e"/>
                <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{ttcontentpva00002})]]></dataSourceExpression>
                <returnValue subreportVariable="SumPointsTest" toVariable="PVA00002sumPoints"/>
                <returnValue subreportVariable="SumPointsStudent" toVariable="PVA00002sumPointsStudent"/>
                <subreportExpression><![CDATA[$P{SUB_PVA00002}]]></subreportExpression>
            </subreport>
            <textField>
                <reportElement positionType="Float" x="306" y="134" width="72" height="20" forecolor="#FF0000" uuid="1afee5f8-1871-4226-9bc0-ae451a99c855"/>
                <textElement>
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.summary.testresult}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement positionType="Float" x="524" y="134" width="11" height="20" forecolor="#FF0000" uuid="17a6af7f-dd1f-4a46-b5b2-b14b36a92f3e"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <text><![CDATA[%]]></text>
            </staticText>
            <textField evaluationTime="Band">
                <reportElement positionType="Float" x="445" y="134" width="36" height="20" forecolor="#FF0000" uuid="214adcc2-2135-45bf-a22b-54d0ae30caca"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PVA00001sumPoints} + $V{PVA00002sumPoints}]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Band">
                <reportElement positionType="Float" x="394" y="134" width="40" height="20" forecolor="#FF0000" uuid="4029dced-e546-4f61-9494-da005fd1d1f7"/>
                <textElement textAlignment="Center">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PVA00001sumPointsStudent} + $V{PVA00002sumPointsStudent}]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Band" pattern="#,##0.00">
                <reportElement positionType="Float" x="491" y="134" width="33" height="20" forecolor="#FF0000" uuid="8b11227e-6e99-4230-9b5e-a59392e18068"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[100.000 / (($V{PVA00001sumPoints}.doubleValue()) + ($V{PVA00002sumPoints}.doubleValue())) * (($V{PVA00001sumPointsStudent}.doubleValue()) + ($V{PVA00002sumPointsStudent}.doubleValue()))]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement positionType="Float" x="434" y="134" width="11" height="20" forecolor="#FF0000" uuid="7026febe-d31c-482e-a665-9a3493f44237"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <text><![CDATA[/]]></text>
            </staticText>
            <subreport isUsingCache="false">
                <reportElement positionType="Float" x="3" y="114" width="527" height="5" uuid="37151f6c-5e45-4c50-b9fc-2856bbd112ac"/>
                <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{ttcontentpva00001})]]></dataSourceExpression>
                <returnValue subreportVariable="SumPoints" toVariable="PVA00001sumPoints"/>
                <returnValue subreportVariable="SumPointsStudent" toVariable="PVA00001sumPointsStudent"/>
                <subreportExpression><![CDATA[$P{SUB_PVA00001}]]></subreportExpression>
            </subreport>
            <subreport isUsingCache="false">
                <reportElement positionType="Float" x="3" y="119" width="527" height="5" uuid="c167bbfd-cffe-4c2b-bb76-2b1fbc2818e7"/>
                <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{ttcontentpva00002})]]></dataSourceExpression>
                <returnValue subreportVariable="SumPointsTest" toVariable="PVA00002sumPoints"/>
                <returnValue subreportVariable="SumPointsStudent" toVariable="PVA00002sumPointsStudent"/>
                <subreportExpression><![CDATA[$P{SUB_PVA00002}]]></subreportExpression>
            </subreport>
            <textField>
                <reportElement x="3" y="24" width="66" height="20" uuid="c5b14cef-cd4c-4f66-af8d-f686444fd561"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.student}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="44" width="66" height="20" uuid="78156659-e5d2-47e5-9e4d-a7bb6cb99d63"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.testdate}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="92" y="65" width="161" height="20" uuid="8fd5c4af-3702-4da1-b356-678b1f1ce556"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{subjectname}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="92" y="85" width="161" height="20" uuid="87f2bda8-260c-4ecf-ae3f-56ef56b6b8ab"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{coursename}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="101" y="5" width="99" height="19" uuid="1dc9e888-68e1-4fd6-a2a0-86249fad2f0f"/>
                <textElement>
                    <font size="14" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{teachertestid}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="5" width="98" height="19" uuid="b67f191c-4ecf-430d-9a19-b122ba4c2bf4"/>
                <textElement verticalAlignment="Middle">
                    <font size="14" isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.header}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="65" width="89" height="20" uuid="a8e235f3-0c5b-4d41-b0c2-ebaba49e23a1"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.subject}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="85" width="89" height="20" uuid="dd644606-663a-4fb1-8547-b8dfc7ff8fa4"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.coursename}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="92" y="24" width="323" height="20" uuid="09067409-622c-4d58-9b28-6ab4edac02a1"/>
                <textElement>
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{username}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="92" y="44" width="323" height="20" uuid="4b383ef9-f210-4e9d-87bd-410890c0d4ab"/>
                <textFieldExpression><![CDATA[$F{datetest}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
    <pageFooter>
        <band height="32" splitType="Stretch">
            <textField>
                <reportElement x="474" y="10" width="28" height="20" uuid="a87145fb-a0c6-4b92-94c2-2e72c146d71a">
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textElement>
                    <font fontName="Arial Narrow" size="12" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PAGE_NUMBER} + " / "]]></textFieldExpression>
            </textField>
            <textField pattern="dd/MM/yyyy HH.mm.ss">
                <reportElement x="60" y="10" width="108" height="20" uuid="9354b111-7421-4703-9dee-1a2e124d3eef"/>
                <textElement>
                    <font fontName="Arial Narrow" size="12" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="412" y="10" width="62" height="19" uuid="d011cdc1-248d-4663-9e20-455728745e84">
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{JReport.page}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="2" y="10" width="58" height="20" uuid="b212e3cc-b4e3-46ae-b13c-1c33d7bfffee"/>
                <textFieldExpression><![CDATA[$R{JReport.printed} + " :"]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Report">
                <reportElement x="504" y="10" width="26" height="20" uuid="fc0ec6f9-939a-48b8-9b57-5e4d4b770ebe">
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textElement>
                    <font fontName="Arial Narrow" size="12" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
    <summary>
        <band height="23" splitType="Stretch">
            <textField pattern="###0.00;-###0.00">
                <reportElement x="430" y="3" width="100" height="20" uuid="d123fd01-2098-47e2-98a4-c9a2b6bfddd0"/>
                <textFieldExpression><![CDATA[$V{ReportSumPercent}]]></textFieldExpression>
            </textField>
        </band>
    </summary>
</jasperReport>
 

Joob

Top Contributor
Ich habe inzwischen schon Gruppen eingebaut. Dabei stellt sich heraus, das Jasper

in der ersten Gruppe: den letzten DetailDatenSatz nicht mitzählt
in der zweiten Gruppe: den letzten DetailDatenSatz dieser Gruppe nicht mitzählt, jedoch den letzten der DetailDatenSatz der ersten Gruppe mitzählt

In Zahlen sieht das so aus:
Grp:69
486​
486​
497​
497​
40​
566​
548​
566​
566​
566​
Rep
1571​
2115​
SumExcel
2137​
2681​
Grp:70
590​
615​
590​
615​
Rep
1156​
1181​
SumExcel
1180​
1230​
Grp:71
151​
186​
Rep
590​
615​
SumExcel
151​
186​
 

Joob

Top Contributor
Hier noch mal der Report mit Gruppen
Java:
<?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="TeacherTestForm1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="444da462-82a7-44f0-985a-9e94e8afe8db">
    <property name="ireport.zoom" value="1.0"/>
    <property name="ireport.x" value="0"/>
    <property name="ireport.y" value="0"/>
    <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["C:\\Users\\Jupp\\Documents\\NetBeansProjects\\VTDESKTOP\\build\\resources\\main\\REPORTS\\"]]></defaultValueExpression>
    </parameter>
    <parameter name="SUB_PVA00001" class="java.lang.Object"/>
    <parameter name="SUB_PVA00002" class="java.lang.Object"/>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="courseid" class="java.lang.String">
        <fieldDescription><![CDATA[courseid]]></fieldDescription>
    </field>
    <field name="coursename" class="java.lang.String">
        <fieldDescription><![CDATA[coursename]]></fieldDescription>
    </field>
    <field name="teachertestid" class="java.lang.String">
        <fieldDescription><![CDATA[teachertestid]]></fieldDescription>
    </field>
    <field name="subjectname" class="java.lang.String">
        <fieldDescription><![CDATA[subjectname]]></fieldDescription>
    </field>
    <field name="userid" class="java.lang.String">
        <fieldDescription><![CDATA[userid]]></fieldDescription>
    </field>
    <field name="username" class="java.lang.String">
        <fieldDescription><![CDATA[username]]></fieldDescription>
    </field>
    <field name="ttcontentpva00002" class="java.util.List">
        <fieldDescription><![CDATA[ttcontentpva00002]]></fieldDescription>
    </field>
    <field name="datetest" class="java.lang.String">
        <fieldDescription><![CDATA[datetest]]></fieldDescription>
    </field>
    <field name="ttcontentpva00001" class="java.util.List">
        <fieldDescription><![CDATA[ttcontentpva00001]]></fieldDescription>
    </field>
    <variable name="PVA00001sumPoints" class="java.lang.Integer" resetType="None">
        <variableExpression><![CDATA[$V{PVA00001sumPoints}]]></variableExpression>
    </variable>
    <variable name="PVA00002sumPoints" class="java.lang.Integer" resetType="None">
        <variableExpression><![CDATA[$V{PVA00002sumPoints}]]></variableExpression>
    </variable>
    <variable name="PVA00002sumPointsStudent" class="java.lang.Integer" resetType="None">
        <variableExpression><![CDATA[$V{PVA00002sumPointsStudent}]]></variableExpression>
    </variable>
    <variable name="PVA00001sumPointsStudent" class="java.lang.Integer" resetType="None">
        <variableExpression><![CDATA[$V{PVA00001sumPointsStudent}]]></variableExpression>
    </variable>
    <variable name="ReportSumPercent" class="java.lang.Double" calculation="Sum">
        <variableExpression><![CDATA[100.000 / (($V{PVA00001sumPoints}.doubleValue()) + ($V{PVA00002sumPoints}.doubleValue())) * (($V{PVA00001sumPointsStudent}.doubleValue()) + ($V{PVA00002sumPointsStudent}.doubleValue()))]]></variableExpression>
    </variable>
    <variable name="PVA00001sumPointsGroup" class="java.lang.Integer" resetType="Group" resetGroup="teacherTest" calculation="Sum">
        <variableExpression><![CDATA[$V{PVA00001sumPoints}]]></variableExpression>
    </variable>
    <variable name="PVA00002sumPointsGroup" class="java.lang.Integer" resetType="Group" resetGroup="teacherTest" calculation="Sum">
        <variableExpression><![CDATA[$V{PVA00002sumPoints}]]></variableExpression>
    </variable>
    <variable name="PVA00002sumPointsStudentGroup" class="java.lang.Integer" resetType="Group" resetGroup="teacherTest" calculation="Sum">
        <variableExpression><![CDATA[$V{PVA00002sumPointsStudent}]]></variableExpression>
    </variable>
    <variable name="PVA00001sumPointsStudentGroup" class="java.lang.Integer" resetType="Group" resetGroup="teacherTest" calculation="Sum">
        <variableExpression><![CDATA[$V{PVA00001sumPointsStudent}]]></variableExpression>
    </variable>
    <group name="teacherTest">
        <groupExpression><![CDATA[$F{teachertestid}]]></groupExpression>
        <groupHeader>
            <band height="47">
                <break>
                    <reportElement x="0" y="17" width="101" height="1" uuid="a4bb62a8-1072-4575-be30-83da146c5513"/>
                </break>
                <textField>
                    <reportElement x="101" y="18" width="99" height="19" uuid="1dc9e888-68e1-4fd6-a2a0-86249fad2f0f"/>
                    <textElement>
                        <font size="14" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{teachertestid}]]></textFieldExpression>
                </textField>
                <textField>
                    <reportElement x="3" y="18" width="98" height="19" uuid="b67f191c-4ecf-430d-9a19-b122ba4c2bf4"/>
                    <textElement verticalAlignment="Middle">
                        <font size="14" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$R{JReport.teachertestform1.header}]]></textFieldExpression>
                </textField>
            </band>
        </groupHeader>
        <groupFooter>
            <band height="37">
                <textField evaluationTime="Band">
                    <reportElement positionType="Float" x="445" y="14" width="36" height="20" forecolor="#FF0000" uuid="1e251a34-94ea-4d9e-b936-120319945c20"/>
                    <textElement textAlignment="Right">
                        <font isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$V{PVA00001sumPointsGroup} + $V{PVA00002sumPointsGroup}]]></textFieldExpression>
                </textField>
                <textField evaluationTime="Band" pattern="#,##0.00">
                    <reportElement positionType="Float" x="491" y="14" width="33" height="20" forecolor="#FF0000" uuid="2614f741-ed9e-4854-8962-c77749cdc217"/>
                    <textElement textAlignment="Right">
                        <font isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[100.000 / (($V{PVA00001sumPointsGroup}.doubleValue()) + ($V{PVA00002sumPointsGroup}.doubleValue())) * (($V{PVA00001sumPointsStudentGroup}.doubleValue()) + ($V{PVA00002sumPointsStudentGroup}.doubleValue()))]]></textFieldExpression>
                </textField>
                <staticText>
                    <reportElement positionType="Float" x="434" y="14" width="11" height="20" forecolor="#FF0000" uuid="3ed12ac2-0fab-402a-abae-64b6e9b1a44e"/>
                    <textElement textAlignment="Right">
                        <font isBold="true"/>
                    </textElement>
                    <text><![CDATA[/]]></text>
                </staticText>
                <staticText>
                    <reportElement positionType="Float" x="524" y="14" width="11" height="20" forecolor="#FF0000" uuid="5cfce498-eed4-4db5-8d67-9a527dfcb10c"/>
                    <textElement textAlignment="Right">
                        <font isBold="true"/>
                    </textElement>
                    <text><![CDATA[%]]></text>
                </staticText>
                <textField>
                    <reportElement positionType="Float" x="306" y="14" width="72" height="20" forecolor="#FF0000" uuid="1976b88f-ebf2-43a1-a50f-d700ec4abb3d"/>
                    <textElement>
                        <font isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$R{JReport.teachertestform1.summary.testresult}]]></textFieldExpression>
                </textField>
                <textField evaluationTime="Band">
                    <reportElement positionType="Float" x="394" y="14" width="40" height="20" forecolor="#FF0000" uuid="7f524495-44cb-4e37-8ed9-bc4562c5f739"/>
                    <textElement textAlignment="Center">
                        <font isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$V{PVA00001sumPointsStudentGroup} + $V{PVA00002sumPointsStudentGroup}]]></textFieldExpression>
                </textField>
            </band>
        </groupFooter>
    </group>
    <background>
        <band splitType="Stretch"/>
    </background>
    <detail>
        <band height="127">
            <textField>
                <reportElement positionType="Float" x="306" y="100" width="72" height="20" forecolor="#FF0000" uuid="1afee5f8-1871-4226-9bc0-ae451a99c855"/>
                <textElement>
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.summary.testresult}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement positionType="Float" x="524" y="100" width="11" height="20" forecolor="#FF0000" uuid="17a6af7f-dd1f-4a46-b5b2-b14b36a92f3e"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <text><![CDATA[%]]></text>
            </staticText>
            <textField evaluationTime="Band">
                <reportElement positionType="Float" x="445" y="100" width="36" height="20" forecolor="#FF0000" uuid="214adcc2-2135-45bf-a22b-54d0ae30caca"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PVA00001sumPoints} + $V{PVA00002sumPoints}]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Band">
                <reportElement positionType="Float" x="394" y="100" width="40" height="20" forecolor="#FF0000" uuid="4029dced-e546-4f61-9494-da005fd1d1f7"/>
                <textElement textAlignment="Center">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PVA00001sumPointsStudent} + $V{PVA00002sumPointsStudent}]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Band" pattern="#,##0.00">
                <reportElement positionType="Float" x="491" y="100" width="33" height="20" forecolor="#FF0000" uuid="8b11227e-6e99-4230-9b5e-a59392e18068"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[100.000 / (($V{PVA00001sumPoints}.doubleValue()) + ($V{PVA00002sumPoints}.doubleValue())) * (($V{PVA00001sumPointsStudent}.doubleValue()) + ($V{PVA00002sumPointsStudent}.doubleValue()))]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement positionType="Float" x="434" y="100" width="11" height="20" forecolor="#FF0000" uuid="7026febe-d31c-482e-a665-9a3493f44237"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <text><![CDATA[/]]></text>
            </staticText>
            <subreport isUsingCache="false">
                <reportElement positionType="Float" x="3" y="80" width="527" height="5" uuid="37151f6c-5e45-4c50-b9fc-2856bbd112ac"/>
                <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{ttcontentpva00001})]]></dataSourceExpression>
                <returnValue subreportVariable="SumPoints" toVariable="PVA00001sumPoints"/>
                <returnValue subreportVariable="SumPointsStudent" toVariable="PVA00001sumPointsStudent"/>
                <subreportExpression><![CDATA[$P{SUB_PVA00001}]]></subreportExpression>
            </subreport>
            <subreport isUsingCache="false">
                <reportElement positionType="Float" x="3" y="85" width="527" height="5" uuid="c167bbfd-cffe-4c2b-bb76-2b1fbc2818e7"/>
                <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
                <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{ttcontentpva00002})]]></dataSourceExpression>
                <returnValue subreportVariable="SumPointsTest" toVariable="PVA00002sumPoints"/>
                <returnValue subreportVariable="SumPointsStudent" toVariable="PVA00002sumPointsStudent"/>
                <subreportExpression><![CDATA[$P{SUB_PVA00002}]]></subreportExpression>
            </subreport>
            <textField>
                <reportElement x="3" y="13" width="98" height="20" uuid="c5b14cef-cd4c-4f66-af8d-f686444fd561"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.student}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="33" width="98" height="20" uuid="78156659-e5d2-47e5-9e4d-a7bb6cb99d63"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.testdate}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="101" y="54" width="161" height="20" uuid="8fd5c4af-3702-4da1-b356-678b1f1ce556"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{subjectname}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="360" y="54" width="161" height="20" uuid="87f2bda8-260c-4ecf-ae3f-56ef56b6b8ab"/>
                <textElement textAlignment="Right">
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{coursename}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="3" y="54" width="98" height="20" uuid="a8e235f3-0c5b-4d41-b0c2-ebaba49e23a1"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.subject}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="262" y="54" width="98" height="20" uuid="dd644606-663a-4fb1-8547-b8dfc7ff8fa4"/>
                <textFieldExpression><![CDATA[$R{JReport.teachertestform1.coursename}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="101" y="13" width="323" height="20" uuid="09067409-622c-4d58-9b28-6ab4edac02a1"/>
                <textElement>
                    <font isBold="true"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{username}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="101" y="33" width="323" height="20" uuid="4b383ef9-f210-4e9d-87bd-410890c0d4ab"/>
                <textFieldExpression><![CDATA[$F{datetest}]]></textFieldExpression>
            </textField>
        </band>
    </detail>
    <pageFooter>
        <band height="32" splitType="Stretch">
            <textField>
                <reportElement x="474" y="10" width="28" height="20" uuid="a87145fb-a0c6-4b92-94c2-2e72c146d71a">
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textElement>
                    <font fontName="Arial Narrow" size="12" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PAGE_NUMBER} + " / "]]></textFieldExpression>
            </textField>
            <textField pattern="dd/MM/yyyy HH.mm.ss">
                <reportElement x="60" y="10" width="108" height="20" uuid="9354b111-7421-4703-9dee-1a2e124d3eef"/>
                <textElement>
                    <font fontName="Arial Narrow" size="12" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="412" y="10" width="62" height="19" uuid="d011cdc1-248d-4663-9e20-455728745e84">
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textFieldExpression><![CDATA[$R{JReport.page}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="2" y="10" width="58" height="20" uuid="b212e3cc-b4e3-46ae-b13c-1c33d7bfffee"/>
                <textFieldExpression><![CDATA[$R{JReport.printed} + " :"]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Report">
                <reportElement x="504" y="10" width="26" height="20" uuid="fc0ec6f9-939a-48b8-9b57-5e4d4b770ebe">
                    <property name="com.jaspersoft.studio.unit.y" value="px"/>
                </reportElement>
                <textElement>
                    <font fontName="Arial Narrow" size="12" isItalic="false"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
    <summary>
        <band height="24" splitType="Stretch">
            <textField evaluationTime="Band" pattern="###0.00;-###0.00">
                <reportElement x="430" y="3" width="100" height="20" uuid="d123fd01-2098-47e2-98a4-c9a2b6bfddd0"/>
                <textFieldExpression><![CDATA[$V{ReportSumPercent}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="322" y="4" width="100" height="20" uuid="aea37433-984d-45b9-8d98-3d1a14198442"/>
                <textFieldExpression><![CDATA[$V{teacherTest_COUNT}]]></textFieldExpression>
            </textField>
        </band>
    </summary>
</jasperReport>
 

Neue Themen


Oben