Jump to content
JasperReports Library 7.0 is now available ×

how to pass JRTableModelDataSource as a datasource parameter to sub report


Recommended Posts

Is this the right approach to pass TableModelDataSource as parameter to subreport via master report

JRTableModelDataSource tds1=new JRTableModelDataSource(new CustomTableModel());
JRTableModelDataSource tds2=new JRTableModelDataSource(new CustomTableModel_sr());
  Map parameters = new HashMap();
  parameters.put("P_subreport_ds1",tds1 );
  parameters.put("P_subreport_ds2",tds2 );

The problem i am facing is when i create parameter for the above in ireport developer, it has datatypes of collections,array list or JREmptydatasource which does not fit for the above

and hence throws class cast exception..


Please suggest


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