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 9008237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:53:43+00:00 2026-06-16T01:53:43+00:00

I have a report created in jasperreports 2.0.4 using iReport. I have two subreports.

  • 0

I have a report created in jasperreports 2.0.4 using iReport. I have two subreports. These two subreports share the same jrxml. I’m passing the jrxml as the subreport’s report expression in a parameter. I have this code for this parameter

<parameter name="SUB_EXP" class="net.sf.jasperreports.engine.JasperReport"/>

Everything works fine. The issue is with the two subreports datasource

The datasource of these subreport comes from the SAME list of POJOs passed as parameter

<parameter name="SUB_SRC" class="com.mycompany.myapplication.core.persistence.MyListDataSource"/>

Here are the subreport jrxml code for the two subreports

1st

<subreport>
    <reportElement positionType="Float" x="0" y="0" width="570" height="1"/>
    <dataSourceExpression>
        <![CDATA[$P{SUB_SRC}]]>
    </dataSourceExpression>
    <subreportExpression class="net.sf.jasperreports.engine.JasperReport">
        <![CDATA[$P{SUB_EXP}]]>
    </subreportExpression>
</subreport>

2nd

<subreport>
    <reportElement positionType="Float" x="0" y="1" width="570" height="1"/>
    <dataSourceExpression>
        <![CDATA[$P{SUB_SRC}]]>
    </dataSourceExpression>
    <subreportExpression class="net.sf.jasperreports.engine.JasperReport">               
        <![CDATA[$P{SUB_EXP}]]>
    </subreportExpression>
</subreport>

You see, the two subreports have the same code.

The weird thing is that, the two subreport shows, but the data for the first subreport is not complete, and those missing data is in the second subreport. The expected behavior is that, the two subreport should two same complete data.

Am I facing some sort of concurrency issue here? If someone could just verify…

  • 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-16T01:53:44+00:00Added an answer on June 16, 2026 at 1:53 am

    Just guessing here, but maybe you are seeing only the complete first subreport..? You can’t use same datasource twice without rewinding it, see:
    How to use the same datasource twice in JasperReports/iReport

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

Sidebar

Related Questions

I have a report document created by Microsoft Reporting but instead of using its
I have a C# 2010 application that contains a report created using Crystal Reports
I have created this report using BIRT and phpjavabridge <?php header(Content-type: application/pdf); header(Content-Disposition: inline;
I have just created a report in Report Manager using a Stored Procedure which
I have created a small report using jasper reports and I previewed it using
I have already created a report using list of data from my database. i
I have created a WinForms application using C# 2010. It contains a report created
I have created a crystal report in VS 2005 using the wizard. In the
I'm using iReport v3.7.6 and JasperReports , I have a request to create a
I have a report created in iReport. Have a parameter set with isForPrompting=true. When

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.