Autogenerated Table of Contents
Task Description
Especially when generating large reports, it would be good to have a table-of-contents for the whole report that allows the reader to jump to the data they are interested in.
Solution approach
A table-of-contents is a special version of a subreport. While processing the master report the first time, the reporting engine should generate a standard datasource with predefined column names. A table of contents would then be a fixed (or user defined) sureport that it printed after the report header.
A special processing step for the TOC generation already exists in JFreeReport 0.8.8 using StructureFunctions. StructureFunctions are part of the layouting process and redefine the report definition before the pagination starts, but after all ordinary functions have been computed. The data for the table-of-contents function would be collected by such an StructureFunction, which would also be responsible for loading or auto-generating the subreport for the table-of-contents.
We have to provide a flexible (but easy to use) way to specify the text for the table-of-contents. This whole task is connected to the PDF-outline task, as they have very similiar requirements.