Repeat Table Header in All Pages - PDF Print Format

Hello All,

I create a custom doctype with a wide child tables, and I need the table header to be repeated in every pages of the print format (the table header NOT the page header/footer which can be set in erpnext setup)

The current PDF files exported creates confusion when reading the table, due to the child table header is splitted and only showing in the first page only, the remaining page the tables are showed without any header and this creates so much confusion when reading. See below and attached files:

I have add a custom HTML based on several thread that I read on this forum but still does not work. See below custom HTML reference:

Is there anyone can help me to solve this issue?

Thanks in advance…

1 Like

If you Google: scroll table header css or fixed table header css, there are many code examples. Would one of them work?

Hello… Thanks for the advise… Managed to solved this by using the below codes:

table.report-container {
section-break-after:always;
}
thead.report-header {
display:table-header-group;
}
tfoot.report-footer {
display:table-footer-group;
}
thead {display: table-header-group; }

Put this on custom CSS on the print format builder of the doctype:

table.report-container {
section-break-after:always;
}
thead.report-header {
display:table-header-group;
}
tfoot.report-footer {
display:table-footer-group;
}
thead {display: table-header-group; }

2 Likes

Here is the results from applying the custom CSS:

Violaaaaa… magic… works like charms…