johnbor Posted December 14, 2009 Share Posted December 14, 2009 Hi, I would like to use subreport inside another subreport. So the idea is that: Master report -> Subreport1 -> Subreport2. And i would like to see that in the end:- PC Store1--- Address: USA, Baltimore--- Telephone number: xxxxx--- Softvers: ( Subreport1 )-----Description: Good stuff-----Details: Very good stuff-----Caution: Not very good stuff-----Types: ( Subreport2 )-------OS: Windows-------Game: COD,WOW, etc.- PC Store2--- Address: ITA, Rome--- Telephone number: xxxxxx--- Softvers: ( Subreport1 )-----Description: xxxx-----Details:xxxx-----Notion:xxxxx-----Types: ( Subreport2 )-------OS: LinuxThe problem is that I don't find the appropriate data modell in Java. I tried to use the JRBeanCollectionDataSource way and the store and type data is ok, but i can't give the right data for subreport2.Can anyone has experience in this area of Jasperreports ( 3.6.1 )?? Link to comment Share on other sites More sharing options...
lucianc Posted December 14, 2009 Share Posted December 14, 2009 There's nothing special about the second level of subreports. So if you have a data model for the first subreport level, that's exactly what you need to have at the second level.And what you need to have are list/collection fields at each leve, which you use as data source for the subreports by wrapping them in JRBeanCollectionDataSources.Regards,Lucian Link to comment Share on other sites More sharing options...
johnbor Posted December 15, 2009 Author Share Posted December 15, 2009 Thx! I thought about that solution, i'll try it.Have a nice day! Link to comment Share on other sites More sharing options...
ckgupta Posted June 6, 2011 Share Posted June 6, 2011 Can this method that you suggested be applied if it dataSource is og type JRResultSetDataSource.I tried passing JRResultSetDataSource as a parameter to subreports , but when I ran it says resultSet is closed.Can you please help me on this .Thanks,ckgupta Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now