<?xml version="1.0"?>
<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd" [
<!ENTITY reportFonts SYSTEM "./ReportFonts.ent">
]>
<jasperReport
name="GeneralTest"
pageWidth="595"
pageHeight="842"
columnWidth="515"
columnSpacing="0"
leftMargin="40"
rightMargin="40"
topMargin="50"
bottomMargin="50"
whenNoDataType="AllSectionsNoDetail"
isTitleNewPage="false"
isSummaryNewPage="false">
&reportFonts;
<parameter name="ReportTitle" class="java.lang.String"/>
<parameter name="FilterClause" class="java.lang.String"/>
<parameter name="OrderClause" class="java.lang.String"/>
<queryString><![CDATA[SELECT * FROM studenti]]>
</queryString>
<field name="id" class="java.lang.Integer"/>
<field name="nome" class="java.lang.String"/>
<field name="cognome" class="java.lang.String"/>
<field name="matricola" class="java.lang.String"/>
<variable name="Count" class="java.lang.Integer" resetType="Group" resetGroup="CountGroup" calculation="System">
<initialValueExpression
>($V
{Count
} != null)?(new Integer($V
{Count
}.
intValue() + 1
)):(new Integer(1))</initialValueExpression
> </variable>
<group name="CountGroup" minHeightToStartNewPage="60">
<groupExpression>
$F{count}
</groupExpression>
<groupHeader>
<band height="20">
<rectangle>
<reportElement x="0" y="4" width="515" height="15" forecolor="#C0C0C0" backcolor="#C0C0C0"/>
</rectangle>
<textField>
<reportElement x="0" y="4" width="515" height="15" backcolor="#C0C0C0" mode="Opaque"/>
<textElement textAlignment="Left">
<font reportFont="Arial_Bold"/>
</textElement>
<textFieldExpression class="java.lang.String">
" " + String.
valueOf($V
{CountNumber
}) </textFieldExpression>
</textField>
<line>
<reportElement x="0" y="19" width="515" height="0"/>
</line>
</band>
</groupHeader>
<groupFooter>
<band height="20">
<line>
<reportElement x="0" y="-1" width="515" height="0"/>
</line>
<staticText>
<reportElement x="400" y="0" width="60" height="15"/>
<textElement textAlignment="Right" lineSpacing="Single">
<font reportFont="Arial_Bold"/>
</textElement>
<text>Count : </text>
</staticText>
<textField>
<reportElement x="460" y="0" width="30" height="15"/>
<textElement textAlignment="Right" lineSpacing="Single">
<font reportFont="Arial_Bold"/>
</textElement>
<textFieldExpression class="java.lang.Integer">
$V{CountGroup_COUNT}
</textFieldExpression>
</textField>
</band>
</groupFooter>
</group>
<title>
<band height="50">
<line>
<reportElement x="0" y="0" width="515" height="0" forecolor="black"/>
</line>
<textField isBlankWhenNull="true">
<reportElement x="0" y="10" width="515" height="30"/>
<textElement textAlignment="Center" lineSpacing="Single">
<font reportFont="Arial_Normal" size="22"/>
</textElement>
<textFieldExpression class="java.lang.String">$P{ReportTitle}</textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="20">
<rectangle>
<reportElement x="0" y="5" width="515" height="15" forecolor="#333333" backcolor="#333333"/>
</rectangle>
<staticText>
<reportElement x="0" y="5" width="55" height="15" forecolor="white" backcolor="#333333" mode="Opaque"/>
<textElement textAlignment="Center">
<font reportFont="Arial_Bold"/>
</textElement>
<text>Nome</text>
</staticText>
<staticText>
<reportElement x="55" y="5" width="205" height="15" forecolor="white" backcolor="#333333" mode="Opaque"/>
<textElement>
<font reportFont="Arial_Bold"/>
</textElement>
<text>Cognome</text>
</staticText>
<staticText>
<reportElement x="260" y="5" width="255" height="15" forecolor="white" backcolor="#333333" mode="Opaque"/>
<textElement>
<font reportFont="Arial_Bold"/>
</textElement>
<text>Matricola</text>
</staticText>
</band>
</pageHeader>
<detail>
<band height="20">
<textField isStretchWithOverflow="true">
<reportElement x="55" y="4" width="200" height="15" positionType="Float"/>
<textFieldExpression class="java.lang.String">
$F{nome}
</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="260" y="4" width="255" height="15" positionType="Float"/>
<textFieldExpression class="java.lang.String">
$F{cognome}
</textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="260" y="4" width="255" height="15" positionType="Float"/>
<textFieldExpression class="java.lang.String">
$F{matricola}
</textFieldExpression>
</textField>
<line>
<reportElement x="0" y="19" width="515" height="0" forecolor="#808080" positionType="Float"/>
</line>
</band>
</detail>
<pageFooter>
<band height="40">
<line>
<reportElement x="0" y="10" width="515" height="0"/>
</line>
<textField>
<reportElement x="200" y="20" width="80" height="15"/>
<textElement textAlignment="Right"/>
<textFieldExpression class="java.lang.String">
"Page " + String.
valueOf($V
{PAGE_NUMBER
}) + " of" </textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="280" y="20" width="75" height="15"/>
<textElement textAlignment="Left"/>
<textFieldExpression class="java.lang.String">
" " + String.
valueOf($V
{PAGE_NUMBER
}) </textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="60">
<textField isStretchWithOverflow="true">
<reportElement x="175" y="20" width="165" height="15"/>
<textElement textAlignment="Center">
<font reportFont="Arial_Italic"/>
</textElement>
<textFieldExpression class="java.lang.String">
"Ci sono " +
String.
valueOf($V
{REPORT_COUNT
}) + " studenti in questo report."
</textFieldExpression>
</textField>
</band>
</summary>
</jasperReport>