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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:01:21+00:00 2026-06-09T01:01:21+00:00

I am trying to create a report with 2 sub-reports for new and used

  • 0

I am trying to create a report with 2 sub-reports for new and used vehicles.

I have defined a vehicle bean as per the JavaBeans specification. I was thinking of using a parameter map to pass this data to the sub report via the main report as was described at Passing JRBeancollection datasourse to master report and subreport post.

Steps I took so far are as follows:

The first step – Passing collection as parameter

Map<String, Object> jasperParameter = new HashMap<String, Object>();
jasperParameter.put("new_Vehicles", createNewVehicles()); //returns a collection of vehicles.

The second step – Creating a parameter, new_Vehicles in my main report and set it as Collection data type

The third step – Creating a data source expression for the sub-report as
net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{new_Vehicles})

The fourth step – Creating a field (just to get this working before I add more fields), vehicleId in the sub report.

Question/Issues I am having and would appreciate any help is:
a) When I compile it gives me an error message that the above mentioned data source cannot be resolved to a type. What am I doing incorrectly?

Ok, so I think I might have gone past the exception by adding “new” in front of the data expression, new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{new_Vehicles}).

But, now if there are two new vehicles that I add to the list its printing in two pages, basically one page per element in the list. My column headers are in the Column Header band and my fields are in the Detail band.

Any suggestions on how I can prevent it from putting each element in the list on a different page?

  • 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-09T01:01:22+00:00Added an answer on June 9, 2026 at 1:01 am

    Delete your unused bands and/or adjust the detail band to the same height as your fields.

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

Sidebar

Related Questions

I am trying to create a new report using the PUSH MODEL to supply
I am trying to create a report in crystal reports 11 based on this
I am new to Microsoft Access and I am trying to create a report
I am trying to create a report that pulls data from 2 tables: a
I am trying to create a report that can be filtered using a form
I am trying to create a report using the mongo connector on iReport designer
i am trying to create a report from a row of data with about
I am trying to create a report that has a summary for each group.
I'm trying to create a report that needs to get the dates for last
I am trying to create some capacity planning reports and one of the requrements

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.