Report Dynamic Table of Contents

Huh. Wow.

So, turns out this is also possible.
Adapting from ReportMill - Table of Contents

  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

And the rendered output looks like this:
image

4 Likes