Repeat a Detail Table on all pages

With the recent update, I was told is no longer allowed in Snippets. Originally, the detail table was printing on every page of the PDF, but when I move this table to the [Section 1] Print Context, it is only printing on the first page. I have tried adding this to the [Single Page] and [Front Page] Master Pages and that doesn’t work either.

Is there any documentation to help with this new version as I am sure others were having detail tables in snippets?

1 Like

It’s perfectly fine to use a data-detail in a snippet. It’s on a master page that it causes problems.

So if the snippet is only called in a print section, you won’t have any issues. But if that snippet is also used in a master page, then yes, it will break.

I follow what you are saying and that makes sense. Since the Front Page and Single Page Masters were calling up the Snippet containing this detail table, I added the table to the print section instead.

On one page PDF’s, the result is perfect. However, if the output produces more than one page, the detail table is only appearing on the first page… I am having trouble duplicating the detail table if there is more than one page. Below is the start of the table, is one of the tags in the HTML causing it to not duplicate properly?

              Credit Card Fee 
            @Credit Card Fee@

Well, the easiest way to have an element repeat on each page is through the master pages, that’s certainly true. There are other, more complicated ways you could get it done…

But perhaps simpler would be to just put your table on the masterpage and build a small script to replicate the Insert Detail Table functionality without actually using the data-detail function (which effectively handles the cloning of rows based on the detail table provided).

To do this, you’d have to create a basic table structure with a single row, then build up a script to loop through your detail table and clone that initial row as many times as needed, all the while doing the data replaces in each new row.

While more complex than what you strictly need, this article should get you going in doing exactly that: https://learn.objectiflune.com/en-us/planetpress-connect/howto/cloning-your-way-through-nested-tables

It explicitly deals with multiple levels of nested data, but that doesn’t have to be the case. You’ll just need to remove a level of looping.