Jump to content
Changes to the Jaspersoft community edition download ×

Subreport with DataSource help!!


2005 IR Help

Recommended Posts

By: Francisco Figueiredo Jr. - fxjr

Subreport with DataSource help!!

2004-05-07 08:21

 

Hi all,

 

I'm having problems dealing with subreports. I'm using exclusively BeanCollection datasources.

 

I'd like to know what is the structure of my beans in the beans collection should be to have subreport working.

 

For example, suppose I have a master bean and my subreport bean with the following fields:

 

Master bean: id, masterDescription

Subreport bean: id, subreportDescription

 

How am I supposed to fill the data in beans to get them working?

 

Is this data layout ok?

 

Master:

id, description

5, "test"

6, "test2"

 

Subreport:

id, description

5, "testSubreport"

5, "testSubreport2"

6, "test3"

6, "test4"

 

So that I can get a report master with 2 elements: 5 and 6 with each having a subreport with 2 elements?

 

Master - subreport,

subreport

 

Master - subreport,

subreport

 

 

 

Also, I could get the jrbeancollection datasource passed to master report as parameter, but I'm not sure about how would be the data layout so that Jasper would get the master data and the subreport data correctly.

 

I'm getting some data printed in report and subreport, but I think I may be doing something wrong as the report doesn't show correctly.

 

Sorry for so newbie question.

 

Please, let me know if you need more info.

 

Thanks in advance.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...