alexxn Posted October 17, 2007 Share Posted October 17, 2007 I tried an alternative solution to create a "table of content" respect to the sample onesuggested in the jasperreports package. My solution avoid the problem relative to the missing pagination count of index pages and avoid the need to use scriptlet. The solution consists of creating the table of content in the position you prefer (at the beginning of the report for example !!!) using a subreport but substituting page numbers with "key words" in the format THIS_IS_THE_INDEX_PLACEHOLDER+ENTITY_ID. While producing the real report pages, you must put another place holder at the beginning of the sections you inserted precedently in the table of content, in the format of THIS_IS_THE_ENTITY_PLACEOLDER+ENTITY_ID. After produced the report, you should be able to scan programmatically the report pages and you can extract the real pages number of each sections you put in table of content using the THIS_IS_THE_ENTITY_PLACEOLDER+ENTITY_ID string and substitute the correspondig THIS_IS_THE_INDEX_PLACEHOLDER+ENTITY_ID woth the right page number. This solution works fine even with multiple looped subreports!! I'm available for further clarification if you are interested.Alex N. Link to comment Share on other sites More sharing options...
venky01 Posted October 24, 2007 Share Posted October 24, 2007 Hi Alex, I am more than happy to hear this news. I have created table of contents as suggested in jasper sample and thinking to add some roman numerals for index page(s). If you can explain me I will modify my report with your valuable solution. I am using many subreports, approx 15. Thanks in advance.Venkat. Link to comment Share on other sites More sharing options...
sunianu Posted November 4, 2008 Share Posted November 4, 2008 hello can you help me in creating table of contents Link to comment Share on other sites More sharing options...
alexxn Posted January 16, 2009 Author Share Posted January 16, 2009 I created an example of the solution.I hope it is comprehnsible. I know that it isn't so simple, but understanding this solution allows you to do everything you want with TOC!! ;) I attached the files in this post but I can't see them so, if they aren't available try to point here :TOC.jarout.pdfPost Edited by Alex Nardelli at 01/16/09 00:22 Link to comment Share on other sites More sharing options...
yhhs09 Posted February 27, 2015 Share Posted February 27, 2015 Hi AlexIs it possible to attach the jrxml file for the table of content mention in this post, or a step by step procedure? 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