Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7665313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:31:58+00:00 2026-05-31T14:31:58+00:00

I have created a report table. I have set it to display 5 rows

  • 0

I have created a report table. I have set it to display 5 rows of data per page. The problem now is when there are less than 5 rows of data the table will not appear.

I have put $V{REPORT_COUNT} %5 == 0 in every section.

How can I modify this formula so that the data rows will display even though there are less than 5 rows?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:31:59+00:00Added an answer on May 31, 2026 at 2:31 pm

    Sorry that I couldn’t reply earlier, as I’d a busy day at work. After looking at your report design, I found that ‘Page Break’ functionality is not something that you really need. I just changed the Group Expression for the group that you have, to : $F{PARENT_NAME} +
    (($V{REPORT_COUNT} % 5 == 0) ? “1” : “2”)
    and set the ‘Start on new page’ parameter to true. Also, I changed the Chart data. Check the below jrxml data:

    <?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>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have data in 2 tables, and I want to create a report. Table
I have created a sample report with crystal report 10. Now, I wanna to
I have a report created in iReport. Have a parameter set with isForPrompting=true. When
Suppose you have thousands of rows of data coming from a table Index |
I have created a report in SSRS that contains 2 matrices (not tables/lists), each
I have a table containing reports and the date/time they were created. I'd like
I have created a report in MS Access report and write some VBA code
I have created this report using BIRT and phpjavabridge <?php header(Content-type: application/pdf); header(Content-Disposition: inline;
I have created a jasper report. In that report in detail areaI have serialNumber
I have just created a report in Report Manager using a Stored Procedure which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.