tsaliki Posted March 16, 2007 Share Posted March 16, 2007 I have too many columns to display in my report. I want to display few columns in page1 and remaining on page2. Is this possible? page 1----------------------------------------------------| field1 | field2 .......................| field9 |----------------------------------------------------| data | data |..........................| data |----------------------------------------------------| data | data |..........................| data |---------------------------------------------------- page2----------------------------------------------------| field10 | field11 |......................| fieldn |----------------------------------------------------| data | data |............................| data |----------------------------------------------------| data | data |............................| data |---------------------------------------------------- Next set of rows will be displayed on Page 3 and 4 and so on. Can anyone has a working sample of "Jasper Tip & Tricks – Bands Larger than One Page." Thanks in advance,tsaliki Link to comment Share on other sites More sharing options...
tsaliki Posted March 19, 2007 Author Share Posted March 19, 2007 Can anyone let me know - whether this is possible to make in Jasper?.... Thanks,Tsaliki Link to comment Share on other sites More sharing options...
slaisne Posted March 19, 2007 Share Posted March 19, 2007 Have you tried crosstab? Link to comment Share on other sites More sharing options...
tsaliki Posted March 20, 2007 Author Share Posted March 20, 2007 Hi Slaisne, I think Crosstab is for different purpose - to show vertical data horizontally or similar purpose. am i not? My requirement is to start the next page with next set of columns after first page. Any ideas, clues or suggestion are highly helpful.... Regards,tsaliki Link to comment Share on other sites More sharing options...
slaisne Posted March 21, 2007 Share Posted March 21, 2007 I have a simular problem, and I solve it with a sub-report which describe one column.Field is in the column header,Data: in the detail.The main report just display the subreport.The main is composed with n colum and an horizontal progress qay. Link to comment Share on other sites More sharing options...
tsaliki Posted March 21, 2007 Author Share Posted March 21, 2007 Hi Slaisne, I was trying hard on your point and could not make out any... I tried to put 1-10 columns in subreport1, 11-20 columns in subreport2. I kept these two subreports in column1 and column2 in main report, and print order is horizontal. Got the error "SubreportÂoverflowedÂonÂaÂbandÂthatÂdoesÂnotÂsupportÂoverflow." I think, using multiple columns do not help as the main report divided vertically so reducing the width for each subreport. Can you provide sample jrxmls used to solve your problem? Thanks,Vijay Link to comment Share on other sites More sharing options...
slaisne Posted March 21, 2007 Share Posted March 21, 2007 No, you've to design just one sub-report for one column, and to put it in the first column in the main report.JasperReport duplicate it on the other column. Main report +--------+--------+--------+--------+--------+--------+|+------+| | | | | || | | | | | ||sub report| | | | | || | | | | | ||+------+| | | | | |+--------+--------+--------+--------+--------+--------+ sub-report +--------++ field ++--------++ data ++ data ++ data ++--------+ Link to comment Share on other sites More sharing options...
tsaliki Posted March 23, 2007 Author Share Posted March 23, 2007 Hi Slaisne, Thanks for the response. I am confused... with one subreport... my requirement is to display 1000 database records of 25 columns as follows... each page will display 25 rows Page1 --> 1-10 columns 1-25 rowsPage2 --> 11-20 columns 1-25 rowsPage3 --> 21-25 columns 1-25 rowsPage4 --> 1-10 columns 26-50 rowsPage5 --> 11-20 columns 26-50 rowsPage6 --> 21-25 columns 26-50 rowsso on... I think this is NOT feasible with Jasper... what would you say... Thankstsaliki Link to comment Share on other sites More sharing options...
dmariaa Posted April 10, 2007 Share Posted April 10, 2007 Hi... I've exactly the same problem. Is there any solution? or is there any planned functionality, open track, to solve this situation? Thanks... Best regards... David Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 20, 2007 Share Posted April 20, 2007 Hi, I was almost on the verge of telling you that is not possible, when I got this crazy idea: Make a report template that has a page width that is N-times wider than the final page width of you document.This way you could put in any section all the columns that you need.Then, let JasperReports produce this wide-page document which would have let's say P pages.When ready, take the resulting JasperPrint object and cut it into pieces like this.Split each page in N smaller pages by creating JRBasePrintPage objects and copying elements to it from the initial wide page. These new pages could be inserted in the list of pages of the original document resulting in a N*P page long document. On this document you then reduce the page width to what your final document would need to have and ... there you go. I hope this helps.Teodor P.S. If this works, it should increase my karma.:-) Link to comment Share on other sites More sharing options...
Gustaf Posted August 3, 2007 Share Posted August 3, 2007 Check out a checklist I have made, if the "subreport overflow error" should appear http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&catid=8&id=29012#29012 If you were not using subreports, nevermind. Link to comment Share on other sites More sharing options...
dbyers Posted March 16, 2008 Share Posted March 16, 2008 hi there, first post. in my project i have a subreport in the title band, and about 20 columns in the master detail band. my requirement is to display the final report using a portrait layout, so the 20 columns would not fit without severely scaling the report in size, or to move to multiple pages. i'm currently trying to use the baseprintpage idea from this thread (copying the wide master to the individual pages), but i'm stuck with the subreport in the title band. should the fact that the parent object is a subreport be ignored, and when i'm copying it i treat it as a set of columns in the new page? is there an easier way to handle the splitting of columns to the next page for wide reports? thanks in advance,Dan Link to comment Share on other sites More sharing options...
rachm3 Posted October 15, 2009 Share Posted October 15, 2009 teodordWrote: Split each page in N smaller pages by creating JRBasePrintPage objects and copying elements to it from the initial wide page. These new pages could be inserted in the list of pages of the original document resulting in a N*P page long document. On this document you then reduce the page width to what your final document would need to have and ... there you go. I having the same problem... could you explain this part better?How do I split each page in N smaller pages by using JRBasePrintPage objects?many thanks,Marco Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 27, 2009 Share Posted October 27, 2009 Hi, You just need to look into the Javadoc of JasperReports. You'll see that JasperPrint objects are made of pages and on each page there are elements.You can get elements from one page and add to another.There is even a sample showing the use of this area of the API under /demo/samples/noreport and /demo/samples/tableofcontents I hope this helps.Teodor Link to comment Share on other sites More sharing options...
haiku Posted January 4, 2010 Share Posted January 4, 2010 Hi Teodor,I tried this and it worked.teodord wrote: Make a report template that has a page width that is N-times wider than the final page width of you document. This way you could put in any section all the columns that you need. Then, let JasperReports produce this wide-page document which would have let's say P pages. When ready, take the resulting JasperPrint object and cut it into pieces like this. Split each page in N smaller pages by creating JRBasePrintPage objects and copying elements to it from the initial wide page. These new pages could be inserted in the list of pages of the original document resulting in a N*P page long document. On this document you then reduce the page width to what your final document would need to have and ... there you go. Thank you :-)I used a wide report template with many columns to produce a JasperPrint with wide pages. I then modified that JasperPrint to have a few columns (which contain row titles and sequence numbers) appear on every page and all other columns (which contain row and column specific data) - each on its corresponding page. Link to comment Share on other sites More sharing options...
p.harrison_1 Posted November 2, 2015 Share Posted November 2, 2015 How about creating several detail bands, just right click on the existing detail band and choose 'Add Band' this creates an additional detail band below the first. I suppose you could then add the first N fields to the original detail band then the next N fields to detail band 2 ..etc. Appropriate print when conditions on each band would be needed so they appear once for each records selected. 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