# Report Dynamic Table of Contents

**URL:** <https://forum.inductiveautomation.com/t/report-dynamic-table-of-contents/30576>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 10, 2019, 4:50pm UTC](https://forum.inductiveautomation.com/t/report-dynamic-table-of-contents/30576 "2019-12-10T16:50:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 10, 2019, 8:28pm UTC](https://forum.inductiveautomation.com/t/report-dynamic-table-of-contents/30576/3 "2019-12-10T20:28:40Z")

</div>

Huh. Wow.

So, turns out this is _also_ possible.  
Adapting from [ReportMill - Table of Contents](http://www.reportmill.com/support/TableOfContents.html)

1. Add a new page (Pages → Add Page Previous)
2. Create a new table. Give it a data key of _exactly_ `TOC.<dataKey>.<dataKey>`
3. Add cells to the details row. Use the existing builtin `@Row@` for the row _within_ the table, the unique-to-table-of-contents `@page@` to refer to the _page that a particular key exists on_, and just use `@<columnName>@` to refer to values from the actual grouping key.
4. Preview the report - the reporting engine should automatically recognize the `TOC` key and insert a table of contents.

To test, I’m using a simple SQL query (`SELECT * FROM SQLTH_TE`) with a table set up so that I end up with a few rows per page, but always multiple pages.  
My table of contents table looks like this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b063939971878253c7685812429a5a708604a796.png)

And the rendered output looks like this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/ab86b45bc8d2e91c785ae00c2d3ce6efd376ee32.png)

---

_[View the full topic](https://forum.inductiveautomation.com/t/report-dynamic-table-of-contents/30576)._
