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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:04:59+00:00 2026-06-02T18:04:59+00:00

This question is about Jasper Reports. Suppose I want to create a Jasper Report

  • 0

This question is about Jasper Reports.

Suppose I want to create a Jasper Report using JRBeanCollectionDataSource like this …

jasperPrint = JasperFillManager.fillReport(JRLoader.getInputStream(fileName), parameters, new JRBeanCollectionDataSource(aList));

And suppose that the PoJo I am using has a Property of type List.

How can I access

  1. The individual items in this List,
  2. and if this item is itself a Pojo access it’s properties in Jasper Report XML
    file.

For example in the Jasper XML file:

...field name="?????" class="java.lang.String" ...

Thanks for your help …

  • 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-02T18:05:00+00:00Added an answer on June 2, 2026 at 6:05 pm

    If your data source has fields of type List (more generally, of type java.util.Collection), then you can use a Table or List or Subreport component to iterate through them. Use one of those elements and set its data source like this:

    new net.sf.jasperreports.engine.data.JRMapCollectionDataSource($F{myListField})
    

    You could also add your own helper class with a static method to deal with these fields appropriately.

    This comes up a lot with MongoDB. I wrote an article on Collections in JasperReports. It uses MongoDB as the data source… but it would apply equally well to your POJO data source.

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

Sidebar

Related Questions

I have seen this question about deploying to WebSphere using the WAS ant tasks.
This is sort of the Java analogue of this question about C# . Suppose
I previously asked this question about how to make versioned serializaion using boost::serialization::access I
I have asked this question about using the a Linq method that returns one
I asked this question about multithreading in servlet, and many people suggest using a
Krumelur asked this question about how create a recipient bubble similar to the mail.app.
I recently posted this question about codes for a gift-card-like voucher that users can
This question is related to my question about Roxygen. I want to write a
I'm trying to run the example from this question about using the BMC remedy
This question about Timers for windows services got me thinking: Say I have (and

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.