Configuring the Table of Contents
Your report book is organized and the reports are populated with data. Now you can configure your Table of Contents so your users can find the information they need.
The Table of Contents is derived from a special data source created by JasperReports and included as a property in the report book. This property, net.sf.jasperreports.bookmarks.data.source.parameter, collects bookmarks from the report book's content pages. So you'll need to add bookmarks to your reports.
To add bookmarks:
| 1. | Open Country_Intro.jrxml in the Design tab. |
| 2. | Click the Country parameter in the Title band. |
| 3. | In the Properties view, click Hyperlink. |
| 4. | Expand the Anchor and Bookmark section. |
| 5. | Click ![expression-editor-button.png.a05ddf50848e7f6e179032277f6088f1.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| 6. | Double-click Country Parameter String to add it to the expression, then click Finish. |
| 7. | In the Properties view, change the Bookmark Level to 1. |
| 8. | Click outside the design space in the Design tab, then click Report in the Properties view. |
| 9. | Click to enable Create bookmarks. |
| 10. | Open the Content_Page_One.jrxml in the Design tab. |
| 11. | Click the $F{SHIPCITY} text band. |
| 12. | In the Properties view, click Hyperlink. |
| 13. | Expand the Anchor and Bookmark section. |
| 14. | Click ![expression-editor-button.png.1ef628fef85918cd557adf30b6d10e92.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| 15. | Double-click SHIPCITY Field String to add it to the expression, then click Finish. |
| 16. | In the Properties view, change the Bookmark Level to 2. |
| 17. | Save all files, and compile the Sample_Book.jrxml. |
Recommended Comments
There are no comments to display.