Congor Posted January 23, 2007 Share Posted January 23, 2007 Hi, ive to add 3 Tables one below the other inone report, is that possible? i dont know in which band to put them. i would really appreciate your help Yves Link to comment Share on other sites More sharing options...
Congor Posted January 25, 2007 Author Share Posted January 25, 2007 I solved the problem. First i made a master-report (like in the example which is called "subreport of the project) then i made a Subreport and a SubSubreport in the masterReport i used the column header and detail for the first table. And inserted the subreport into the summary band! (Cause i made tests with the overflow behaviour of all the bands, with the result that just detail and summary support overflow in proper way, the other bands not!) The second Table i added to the columnHeader anddetail band of the Subreport.I added the SubSubreport into the summaryband of this Subreport as i did before with the masterReport. And the third table into the SubSubreport, again in column header and detail band. All of these reports use the Report_Connection ofthe master report therefore, i had to define parameters for all DataSources and Sub- and SubSubreports in the Masterreport (execpt its own datasource, cause it is automatically handed over as the REPORT_DATASOURCE Parameter when calling fillToReport(..,masterReportDataSource) in Java). I ended up havin following -Parameters- in the masterReport: Subreport (of class JasperReport)SubSubreport (of class JasperReport)SubreportDataSource (of class JRDataSource)SubSubreportDataSource (of class JRDataSource) and in the Subreport: SubSubreport (of class JasperReport)SubSubreportDataSource (of class JRDataSource) Then i configurated (in the master report)the subreport properties as follows: 1. it uses the SubReportDataSource (defined before as parameter) as its datasource. 2. it is the Subreport that will be handed over asthe subreport parameter(in "subreport expression")of class net.sf.jasperreports.engine.JasperReport. 3. it TAKES the SubSubreportDataSource and the SubSubreport (both defined as parameter) as Parameters. (in "subreport parameters"). Then i configurated the SubSubreport in the -summary band of the subreport- just as before for the subreport in the masterreport except that i nowused the SubSubreport and the SubSubreportDataSource. Of course, in Java we have to hand over all DataSources and sub(sub)reports in the parameters mapof the master report just as normal parameters. parameters.put("Subreport", mySubreport);parameters.put("SubreportDataSource", mySubreportDataSource); parameters.put("SubSubreport", mySubSubreport);parameters.put("SubSubreportDataSource", mySubSubreportDataSource); Where:mySubreport.class == JasperReportmySubreportDataSource.class == JRDataSource"Subreport", "SubreportDataSource" are the namesof the -Parameters- in the masterReport as i saidbefore. Hope anyone can use this. YvesPost edited by: Congor, at: 2007/01/25 09:03 Link to comment Share on other sites More sharing options...
Congor Posted January 25, 2007 Author Share Posted January 25, 2007 Oh, i forgot to say, that i used the SoftwareiReport. YvesPost edited by: Congor, at: 2007/01/25 09:04 Link to comment Share on other sites More sharing options...
Congor Posted January 25, 2007 Author Share Posted January 25, 2007 Oh, i forgot to say, that i used the SoftwareiReport. Yves 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