Jump to content
We've recently updated our Privacy Statement, available here ×

JavaBeanDataSource in sub report


akash12_06

Recommended Posts

Hi All,

I am using Java Bean data source in my master report.  My parent bean has few properties and few collections.

Properties, i want to display in main report where for collections, i want to display separate graphs.

I got success in displaying properties from bean to master report. But now wondering how to show collections from bean as charts ? Sub report is  correct way to do so or some way is also possible?

I really stuck how I can bind sub report's data source with collection from bean.

Plz help me.

 

 

 

 

 

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Got it.

 

There is bit different way when you are defining data source for main report and for sub data sets ( sub report, charts ).

 

If you want to define collection as datasource for sub data sets, just wrape it arround JDataSource and give this JDataSource property as datasource for sub data set.

 

Let me know if any one want related example also..

Link to comment
Share on other sites

  • 3 weeks later...

hi all,

I'm using XML data source..can anyone provide example for sub dataset using XML data source.

I created 1 sub data set and placed two fields on design and tested,it says field not found exception..

I don't find any resource which talks about this ..Can anyone provide resource for sub dataset usage for XMl Data source...

Waiting for reply..

Thx,

Ani

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

I have same problem.

I have created my report from my class and JasperReport run, but I have a problem with subreport.

Example:

My Class is Persona and his field are:

    private long id;
    private String nome;
    private String cognome;
   
    private Collection<Figlio> figli = new ArrayList<Figlio>(0);

My report print all Persona correctly but i want print all Figlio collection too.

How can i do?

Sorry for my english.

Help me, please

Thanks

Luca

Link to comment
Share on other sites

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