Jump to content

how to use two javabean datasources together


Recommended Posts

By: Leti - leticiarios

how to use two javabean datasources together

2006-04-11 01:13

 

I have a report with a crosstab and a chart, and they have different javabean datasources. Is there a way to pass two different javabean collection datasources to the JasperFillManager Object ??

 

For example :

 

jasperPrint =

JasperFillManager.fillReport(

jasperReport,

parameters,

myCollection

);

 

I have one collection in the myCollection variable. How can I pass the other javabean collection to the constructor ? Or I must use in this particular case a connection ?

 

thanks in advance,

 

leti

 

 

 

 

By: Code_Slave - code_slave

RE: how to use two javabean datasources together

2006-04-12 15:21

I asked for this function about a year ago.

 

the only way is to have a single datasource, and have some switch logic to switch between the other 2.

 

 

 

 

By: Lucian Chirita - lucianc

RE: how to use two javabean datasources toget

2006-04-13 02:28

There is no way to pass two data sources to a report, but if you only need a data source for a chart and the other for a crosstab (i.e. you don't have a detail band for the data), you can create two subdatasets for the chart and crosstab, pass your two bean collections as report parameters and use the parameters to instantiate the subdatasets.

 

HTH,

Lucian

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...