Table of contents and index elements
There are two special types of subreports not explained yet: table of contents and index. The table of content (TOC) feature allows you to generate a TOC based on the groups you have mapped inside the report or to specify the subreports you want included in your TOC. The index feature allows you to generate an index based on the fields (or groups) in your report. When the index is generated, it displays the instances and page numbers in which the field name appears.
Example of index
As an example, let's see how to include the index to an existing report, of course assuming the report is big, defined by a lot of pages (otherwise, the index doesn't make a lot of sense). The report used to add the index is a basic report, built on a JDBC data source with the following query:
SELECT "PUBLIC"."ORDERFACT"."ORDERDATE", "PUBLIC"."ORDERFACT"."ORDERNUMBER", "PUBLIC"."CUSTOMERS"."CUSTOMERNAME", "PUBLIC"."ORDERFACT"."TOTALPRICE" FROM "PUBLIC"."CUSTOMERS" INNER...