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

  • Home
  • SEARCH
  • 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 9090953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:29:44+00:00 2026-06-16T22:29:44+00:00

I am using iReports version 3.7.6. I am generating a table dynamically by associating

  • 0

I am using iReports version 3.7.6.
I am generating a table dynamically by associating it to a query using data set.

When the query returns records, I am getting a table printed containing all the records.

However when query returns zero records, I need to display an empty table. But I am getting just a horizontal line.

Below is the part of the jasper XML file:

<componentElement>
    <reportElement x="131" y="11" width="424" height="24"/>
    <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
        <datasetRun subDataset="pmDataSet">
            <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression>
            <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
        </datasetRun>
        <jr:listContents height="24" width="424">
            <textField>
                <reportElement x="0" y="0" width="134" height="22"/>
                <box>
                    <topPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement/>
                <textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_1}]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="134" y="0" width="120" height="22"/>
                <box>
                    <topPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement/>
                <textFieldExpression class="java.lang.String"><![CDATA[($F{COLUMN_2}) ? $F{COLUMN_2} : "(Blank)"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="254" y="0" width="170" height="22"/>
                <box>
                    <topPen lineWidth="0.5"/>
                    <rightPen lineWidth="0.5"/>
                </box>
                <textElement/>
                <textFieldExpression class="java.lang.String"><![CDATA[$F{COLUMN_3}]]></textFieldExpression>
            </textField>
        </jr:listContents>
    </jr:list>
</componentElement>

Here I have used “List” element (jr:list) and associated it with a data set.

  • 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-06-16T22:29:45+00:00Added an answer on June 16, 2026 at 10:29 pm

    As far as i know, this cannot be achieved with a table. But still, there is a work around.

    Use a Subreport instead of a table. Everything that is accomplished using table can also be done using a subreport. Only thing you will need to take care of is this property.

    When No Data

    Set it either to

    • All Sections No Detail : display only header information
    • No Data Section: so that a custom message can be displayed in the No Data band.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi every one I am using iReports for generating one of the reports and
I am trying to create a data table using Jasper reports. I am using
We are generating reports based on iReports and JasperReports for web application. Using iReports
Using a populated Table Type as the source for a TSQL-Merge. I want to
I am using iReports with my web application where i render charts using the
I am developing report containing sub report using iReport and i am passing two
I am using List component iReport the data is populating but the pdf has
I am facing issues while creating table component in report summary panel using XML
I would like to know how to generate reports using the Jasper IReports tool
Some of my company consultants created multiple jasper reports (using iReports) which will be

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.