luulamuse Posted January 11, 2013 Share Posted January 11, 2013 Hi,I received a collections of animals in my master report. I added 2 subreports into the master reports.The first subreport should display only dogs informations and the second subreport should display only cats informations by following the order of the main collections.I tried 3 differents attempts to get the expected results but none of them have worked!!1) first attemptTo pass data to each subreport, I did this:connection type = use a data source expressiondata source expression = ((net.sf.jasperreports.engine.data.JRBeanCollectionDataSource)$P{REPORT_DATA_SOURCE}).cloneDataSource()I created parameters to display details.In each subreport, all animals are displayed animals (cats and dogs) which is bad.2) second attemptTo pass data to each subreport, I did this:connection type = use a data source expressiondata source expression = $P{REPORT_DATA_SOURCE})In each subreport, only the first animal is displayed. Any iteration is done.Could you please help me. I am new in Jasper report and I don't know how to pass data from master to subreport one element at time.Thanks a lot. Link to comment Share on other sites More sharing options...
softxiaohui Posted January 12, 2013 Share Posted January 12, 2013 you can a datasoure for each subreportexample:dogs subreport is dogsDatasourcecats subreport is catsDatasource ^-^ china english Link to comment Share on other sites More sharing options...
KGZ Posted January 12, 2013 Share Posted January 12, 2013 Hi,First attempt is intersting, can you give more details about the parameters you used to display details in each subreport ?KGZ Link to comment Share on other sites More sharing options...
mrcaffeine Posted January 14, 2013 Share Posted January 14, 2013 what kind of datasource are you using? Link to comment Share on other sites More sharing options...
vbence Posted February 17, 2015 Share Posted February 17, 2015 Can you do it? 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