2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: Thomas Hackel - thackel More than one details band 2004-08-31 04:50 I am quite new to JasperReports and dont have a solution for my problem. I would like to have two (or more) details band at one page so i can show different tables on the same report. Is that only possible with subreports? By: Chuck Deal - cdeal RE: More than one details band 2004-08-31 05:06 I would say that you probably have two possible solutions. 1. Use subreports in the detail band. Each table is a subreport. 2. Use groups to represent the tables. The groupExpression could be empty, which means that the group will only appear once for the report. Link to comment Share on other sites More sharing options...
anish Posted July 11, 2007 Share Posted July 11, 2007 hi, my requirement is the same, i tried the first solutions (using sub-reports ) but is not working. I need my first table to be printed fully and next the second table... Please help. Thanks in advance,Anish Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 11, 2007 Share Posted July 11, 2007 If you need multiple subreports in a single report there are several ways to do this. 1. create a subreport and place it in the 'detail' band. --Inside of that subreport (nest) create yet another subreport but pass it the first sub's parameters...Repeat until limit is reached or machine crashes : ) 2. Create a seperate group for each individual subreport that you need in the MAIN report. Then place your subreports inside of the group headers. 3. Create a subreport inside the 'Detail' band. Then create groups inside of that subreport to place the other subreports that you need. Here are the tutorials, read over them carefully and you should find everything that you need. http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/Samples Link to comment Share on other sites More sharing options...
anish Posted July 12, 2007 Share Posted July 12, 2007 Hi codyJasperForge, I am using jasperreports1.3.3, and my problem is this. I have a information section followed by a table and another table to be displayed. I have placed my information section in the title band and I have no problem in that. My problem is I have to place two tables which are not related to each other in the details section( both have dynamic Number of rows) . I have to display the table one after the other. I am new to Jasper and have no idea about subReports or groupings. Please help me do it. Please explain step wise. Thanks,Anish. Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 12, 2007 Share Posted July 12, 2007 If I understand you correctly, these are your steps: 1. create a subreport and place it in the 'detail' band. Make sure that the filename of your subreport is syncronized with the main report. (i.e. Report1.jrxml -> Report1_subreport1.jrxml) Insert the query necessary to fill your table. (inside the query expression) Make sure that the subreport directory matches that of the main report. (i.e. C:Documents and settings...Report1_subreport1.jxrml) Include all necessary fields (>>) button Let the wizard organize you field Column style. Store the directory name in a parameter if you plan on moving these files.(if not, use absolute directory) 2. Inside of the subreport, organize your data in tabular style. (Column headers in header band, field values in detail band) 3. In the main report, create a group. Call it table2.(or whatever your second table is named) -Inside of the 'Table2GroupHeader' band place yet another subreport. This time use the sql query needed to fill table 1's values. Repeat the subreport creation process for this table and format it similar to the other subreport's format. (Column header in header band, fields in detail band) 4. Make sure that 'Table2GroupHeader's band properties does not have 'Split Allowed' option checked. (right click inside of the band and choose 'band properties') Do these steps and reply for further instructions... Your welcomePost edited by: codyjasperForge, at: 2007/07/12 14:43 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