Jasper reports 如何在jasper报告中显示少于5行的数据
我已经创建了一个报告表。我已将其设置为每页显示5行数据。现在的问题是,当数据行少于5行时,表将不会出现 我在每个部分都放了$V{REPORT\u COUNT}%5==0Jasper reports 如何在jasper报告中显示少于5行的数据,jasper-reports,Jasper Reports,我已经创建了一个报告表。我已将其设置为每页显示5行数据。现在的问题是,当数据行少于5行时,表将不会出现 我在每个部分都放了$V{REPORT\u COUNT}%5==0 如何修改此公式,使数据行即使少于5行也能显示?您可以创建一个虚拟组,将“minHeightToStartNewPage”属性设置为700/800,这取决于“纵向”的报表设计,而500/550取决于“横向”设置的报表设计。然后,您可以将此虚拟组的printWhenExpression的值设置为“$V{REPORT\u COUNT}
如何修改此公式,使数据行即使少于5行也能显示?您可以创建一个虚拟组,将“minHeightToStartNewPage”属性设置为700/800,这取决于“纵向”的报表设计,而500/550取决于“横向”设置的报表设计。然后,您可以将此虚拟组的printWhenExpression的值设置为“$V{REPORT\u COUNT}%5==0”
注意:如果minHeightToStartNewPage的值未正确设置为大于页面长度,它可能会遇到无限循环问题。您可以创建一个虚拟组,将“minHeightToStartNewPage”属性设置为700/800取决于“纵向”的报表设计,而500/550取决于“横向”设置的报表设计。然后,您可以将此虚拟组的printWhenExpression的值设置为“$V{REPORT\u COUNT}%5==0”
注意:如果minHeightToStartNewPage的值未正确设置为大于页面长度,则可能会遇到无限循环问题。很抱歉,我无法提前回复,因为我工作很忙。在查看了您的报表设计之后,我发现“分页符”功能并不是您真正需要的。我刚刚将您拥有的组的组表达式更改为:$F{PARENT_NAME}+ $V{REPORT_COUNT}%5==0?1:2,并将“开始于新页面”参数设置为true。此外,我还更改了图表数据。检查以下jrxml数据:
<?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="ChartLineBless" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="P_YEAR" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="P_AGENCY_CODE" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="P_SECTOR_LOOK_CODE" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<field name="PARENT_NAME" class="java.lang.String"/>
<field name="PARENT_NAME_SECTOR" class="java.lang.String"/>
<field name="AGENCY_PARENT_CODE" class="java.lang.String"/>
<field name="AGENCY_CODE" class="java.lang.String"/>
<field name="AGENCY_NAME" class="java.lang.String"/>
<field name="YEAR" class="java.lang.String"/>
<field name="SECTOR_ID" class="java.lang.String"/>
<field name="SECTOR_NAME" class="java.lang.String"/>
<field name="DYEAR1" class="java.math.BigDecimal"/>
<field name="DYEAR2" class="java.math.BigDecimal"/>
<field name="DYEAR3" class="java.math.BigDecimal"/>
<field name="DYEAR4" class="java.math.BigDecimal"/>
<field name="DYEAR5" class="java.lang.String"/>
<field name="YR1" class="java.math.BigDecimal"/>
<field name="YR2" class="java.math.BigDecimal"/>
<field name="YR3" class="java.math.BigDecimal"/>
<field name="YR4" class="java.math.BigDecimal"/>
<field name="YR5" class="java.math.BigDecimal"/>
<variable name="YR1_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR1}]]></variableExpression>
</variable>
<variable name="YR2_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR2}]]></variableExpression>
</variable>
<variable name="YR3_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR3}]]></variableExpression>
</variable>
<variable name="YR4_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR4}]]></variableExpression>
</variable>
<variable name="YR5_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR5}]]></variableExpression>
</variable>
<group name="agensi" isStartNewPage="true" minHeightToStartNewPage="550">
<groupExpression><![CDATA[$F{PARENT_NAME} +
(($V{REPORT_COUNT} % 5 == 0) ? "1" : "2")]]></groupExpression>
<groupHeader>
<band height="98">
<textField>
<reportElement x="332" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR2}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="247" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR1}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="43" y="71" width="204" height="27"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Agency Name]]></text>
</staticText>
<staticText>
<reportElement x="10" y="71" width="33" height="27"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[No.]]></text>
</staticText>
<textField>
<reportElement x="417" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR3}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="247" y="71" width="425" height="13"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[Year]]></text>
</staticText>
<staticText>
<reportElement x="672" y="71" width="85" height="27"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Total]]></text>
</staticText>
<textField>
<reportElement x="587" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR5}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="502" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR4}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="22" width="802" height="26"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[5 YEAR STATISTICS ON APPLICATION RECEIVED (BY ALL AGENCIES)]]></text>
</staticText>
</band>
</groupHeader>
<groupFooter>
<band height="208">
<printWhenExpression><![CDATA[$V{REPORT_COUNT} % 5 == 0]]></printWhenExpression>
<textField>
<reportElement x="672" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[new Integer($V{YR1_1}.intValue() + $V{YR2_1}.intValue()+
$V{YR3_1}.intValue()+ $V{YR4_1}.intValue())+ $V{YR5_1}.intValue()]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="10" y="0" width="237" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[ Total]]></text>
</staticText>
<textField>
<reportElement x="587" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR5_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="502" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR4_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="417" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR3_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="332" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR2_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="247" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR1_1}]]></textFieldExpression>
</textField>
<lineChart>
<chart>
<reportElement x="144" y="34" width="549" height="173"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<dataset resetType="Page"/>
<categorySeries>
<seriesExpression><![CDATA["YEAR1"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR1}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR1_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["Year2"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR2}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR2_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["YEAR3"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR3}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR3_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["YEAR4"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR4}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR4_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["YEAR5"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR5}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR5_1}]]></valueExpression>
</categorySeries>
</categoryDataset>
<linePlot>
<plot/>
</linePlot>
</lineChart>
<break>
<reportElement x="0" y="206" width="802" height="1"/>
</break>
</band>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="20" splitType="Stretch">
<textField>
<reportElement x="43" y="0" width="204" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{PARENT_NAME_SECTOR}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="247" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="332" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR2}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="417" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR3}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="502" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR4}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="587" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR5}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="10" y="0" width="33" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{COLUMN_COUNT}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="672" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[new Integer($F{YR1}.intValue() + $F{YR2}.intValue()+ $F{YR3}.intValue()+ $F{YR4}.intValue())+ $F{YR5}.intValue()]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="23">
<textField evaluationTime="Report">
<reportElement x="445" y="3" width="40" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="365" y="3" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
</band>
</columnFooter>
</jasperReport>
很抱歉,我不能早点回复,因为我工作忙了一天。在查看了您的报表设计之后,我发现“分页符”功能并不是您真正需要的。我刚刚将您拥有的组的组表达式更改为:$F{PARENT_NAME}+ $V{REPORT_COUNT}%5==0?1:2,并将“开始于新页面”参数设置为true。此外,我还更改了图表数据。检查以下jrxml数据:
<?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="ChartLineBless" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="P_YEAR" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="P_AGENCY_CODE" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="P_SECTOR_LOOK_CODE" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<field name="PARENT_NAME" class="java.lang.String"/>
<field name="PARENT_NAME_SECTOR" class="java.lang.String"/>
<field name="AGENCY_PARENT_CODE" class="java.lang.String"/>
<field name="AGENCY_CODE" class="java.lang.String"/>
<field name="AGENCY_NAME" class="java.lang.String"/>
<field name="YEAR" class="java.lang.String"/>
<field name="SECTOR_ID" class="java.lang.String"/>
<field name="SECTOR_NAME" class="java.lang.String"/>
<field name="DYEAR1" class="java.math.BigDecimal"/>
<field name="DYEAR2" class="java.math.BigDecimal"/>
<field name="DYEAR3" class="java.math.BigDecimal"/>
<field name="DYEAR4" class="java.math.BigDecimal"/>
<field name="DYEAR5" class="java.lang.String"/>
<field name="YR1" class="java.math.BigDecimal"/>
<field name="YR2" class="java.math.BigDecimal"/>
<field name="YR3" class="java.math.BigDecimal"/>
<field name="YR4" class="java.math.BigDecimal"/>
<field name="YR5" class="java.math.BigDecimal"/>
<variable name="YR1_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR1}]]></variableExpression>
</variable>
<variable name="YR2_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR2}]]></variableExpression>
</variable>
<variable name="YR3_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR3}]]></variableExpression>
</variable>
<variable name="YR4_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR4}]]></variableExpression>
</variable>
<variable name="YR5_1" class="java.math.BigDecimal" resetType="Group" resetGroup="agensi" calculation="Sum">
<variableExpression><![CDATA[$F{YR5}]]></variableExpression>
</variable>
<group name="agensi" isStartNewPage="true" minHeightToStartNewPage="550">
<groupExpression><![CDATA[$F{PARENT_NAME} +
(($V{REPORT_COUNT} % 5 == 0) ? "1" : "2")]]></groupExpression>
<groupHeader>
<band height="98">
<textField>
<reportElement x="332" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR2}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="247" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR1}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="43" y="71" width="204" height="27"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Agency Name]]></text>
</staticText>
<staticText>
<reportElement x="10" y="71" width="33" height="27"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[No.]]></text>
</staticText>
<textField>
<reportElement x="417" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR3}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="247" y="71" width="425" height="13"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[Year]]></text>
</staticText>
<staticText>
<reportElement x="672" y="71" width="85" height="27"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[Total]]></text>
</staticText>
<textField>
<reportElement x="587" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR5}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="502" y="84" width="85" height="14"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{DYEAR4}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="22" width="802" height="26"/>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<text><![CDATA[5 YEAR STATISTICS ON APPLICATION RECEIVED (BY ALL AGENCIES)]]></text>
</staticText>
</band>
</groupHeader>
<groupFooter>
<band height="208">
<printWhenExpression><![CDATA[$V{REPORT_COUNT} % 5 == 0]]></printWhenExpression>
<textField>
<reportElement x="672" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[new Integer($V{YR1_1}.intValue() + $V{YR2_1}.intValue()+
$V{YR3_1}.intValue()+ $V{YR4_1}.intValue())+ $V{YR5_1}.intValue()]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="10" y="0" width="237" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<text><![CDATA[ Total]]></text>
</staticText>
<textField>
<reportElement x="587" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR5_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="502" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR4_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="417" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR3_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="332" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR2_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="247" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{YR1_1}]]></textFieldExpression>
</textField>
<lineChart>
<chart>
<reportElement x="144" y="34" width="549" height="173"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<dataset resetType="Page"/>
<categorySeries>
<seriesExpression><![CDATA["YEAR1"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR1}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR1_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["Year2"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR2}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR2_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["YEAR3"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR3}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR3_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["YEAR4"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR4}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR4_1}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["YEAR5"]]></seriesExpression>
<categoryExpression><![CDATA[$F{DYEAR5}]]></categoryExpression>
<valueExpression><![CDATA[$V{YR5_1}]]></valueExpression>
</categorySeries>
</categoryDataset>
<linePlot>
<plot/>
</linePlot>
</lineChart>
<break>
<reportElement x="0" y="206" width="802" height="1"/>
</break>
</band>
</groupFooter>
</group>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="20" splitType="Stretch">
<textField>
<reportElement x="43" y="0" width="204" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement/>
<textFieldExpression><![CDATA[$F{PARENT_NAME_SECTOR}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="247" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="332" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR2}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="417" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR3}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="502" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR4}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="587" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$F{YR5}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="10" y="0" width="33" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$V{COLUMN_COUNT}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="672" y="0" width="85" height="20"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[new Integer($F{YR1}.intValue() + $F{YR2}.intValue()+ $F{YR3}.intValue()+ $F{YR4}.intValue())+ $F{YR5}.intValue()]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="23">
<textField evaluationTime="Report">
<reportElement x="445" y="3" width="40" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="365" y="3" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
</band>
</columnFooter>
</jasperReport>
是否尝试使用分页符元素?可能重复:是否尝试使用分页符元素?可能重复:虚拟组?。我从未在我的报告中看到过这个功能。我怎样才能得到它。你能告诉我吗?请给我举个例子。如果你能提供jrxml文件,我可以告诉你怎么做。虚拟组?。我从未在我的报告中看到过这个功能。我怎样才能得到它。你能告诉我吗?请给我举个例子。如果你能提供jrxml文件,我可以告诉你怎么做。我已经试过了。您提供的jxml文件。首先,从桌子上爆发出来的那一行。每个页面只显示一行,因为您将startpagenew=true。当我取消选中时,数据显示为每页5行。但是总行和图表没有出现在最后一页上。其次,我有一个更改组表达式是$F{PARENT_NAME_SECTOR}+$V{REPORT_COUNT}%5==0?1:2.我尝试更新这个文件,希望你能修复它,并向我提供反馈。我不知道你的要求,但给出了如何实现的想法。剩下的就交给你吧!这种情况。我想在一个表中每页显示5行。每一页的行数为1-5。我试过你的例子。是的,成功了。但问题是最后一页的数据没有显示。我不知道为什么。你能看看我的照片吗。我也在上面更新了我的代码。你可以看到这个代码。这是我的图片。第一页和最后一页[1]:[2]:最后一页没有数据。我的意思是,一切都是“0”。所以,也许这就是图表没有显示的原因。如果你看到我的结果图片,你可以看到最后一页的数据没有显示,因为我认为每个部分的问题是$V{REPORT\u COUNT}%5==0。这就是为什么,报告每页只读取5个数据。您是否认为有其他方法可以确定数据是否等于5且小于5。它将显示数据。我希望你能检查我的代码,给我feedbak。我试了很多次,但结果还是一样。我试过了。您提供的jxml文件。首先,从桌子上爆发出来的那一行。每个页面只显示一行,因为您将startpagenew=true。当我取消选中时,数据显示为每页5行。但是总行和图表没有出现在最后一页上。其次,我有一个更改组表达式是$F{PARENT_NAME_SECTOR}+$V{REPORT_COUNT}%5==0?1:2.我尝试更新这个文件,希望你能修复它,并向我提供反馈。我不知道你的要求,但给出了如何实现的想法。剩下的就交给你吧!这种情况。我想在一个表中每页显示5行。每一页的行数为1-5。我试过你的例子。是的,成功了。但问题是最后一页的数据没有显示。我不知道为什么。你能看看我的照片吗。我也在上面更新了我的代码。你可以看到这个代码。这是我的照片。首先
第页和最后一页[1]:[2]:最后一页没有数据。我的意思是,一切都是“0”。所以,也许这就是图表没有显示的原因。如果你看到我的结果图片,你可以看到最后一页的数据没有显示,因为我认为每个部分的问题是$V{REPORT\u COUNT}%5==0。这就是为什么,报告每页只读取5个数据。您是否认为有其他方法可以确定数据是否等于5且小于5。它将显示数据。我希望你能检查我的代码,给我feedbak。我尝试了很多次,但结果还是一样。