I tried a simple test custom report this is the code
<div id="htmlheader">
<h1>Header</h1>
</div>
<h1> Page 1 </h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Fusce vitae massa eget nulla porttitor egestas. Suspendisse vel tincidunt elit.
Praesent ultricies sit amet neque ac dignissim. Mauris commodo sem sit amet lacus convallis suscipit.
Suspendisse nulla massa, varius id tellus eget, tincidunt vestibulum libero.
</p>
<div class="page-break"></div>
<h1> Page 2 </h1>
<p>
In ligula quam, molestie in maximus a, scelerisque et urna. Etiam posuere, lacus sed vehicula scelerisque,
nibh quam dapibus tortor, id convallis tellus lectus et orci. Fusce hendrerit dui eget iaculis maximus.
Etiam posuere purus quis erat luctus lobortis. Vivamus scelerisque tempor elit.
Ut mollis semper ultrices. In tristique dui libero, in malesuada ligula pulvinar eget. Cras sodales luctus rutrum.
</p>
@gabtzi still does not work. The same output above this is my revise code below
<div id="header-html">
<h1>Header</h1>
</div>
<h1> Page 1 </h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Fusce vitae massa eget nulla porttitor egestas. Suspendisse vel tincidunt elit.
Praesent ultricies sit amet neque ac dignissim. Mauris commodo sem sit amet lacus convallis suscipit.
Suspendisse nulla massa, varius id tellus eget, tincidunt vestibulum libero.
</p>
<div class="page-break"></div>
<h1> Page 2 </h1>
<p>
In ligula quam, molestie in maximus a, scelerisque et urna. Etiam posuere, lacus sed vehicula scelerisque,
nibh quam dapibus tortor, id convallis tellus lectus et orci. Fusce hendrerit dui eget iaculis maximus.
Etiam posuere purus quis erat luctus lobortis. Vivamus scelerisque tempor elit.
Ut mollis semper ultrices. In tristique dui libero, in malesuada ligula pulvinar eget. Cras sodales luctus rutrum.
</p>
I see, then I think it won’t work there. You can definitely use it for quotations,sales orders and invoices though.
I originally started developing a workaround for this issue as a way to get a legitimate invoice printed physically in the end or sent as a signed PDF via email so when I started doing it I did it for the invoices and tested for the invoices.
I really have no idea how this could be implemented for HTML output though. In HTML the idea is that you can use a “position: fixed” element as header to keep the header always in view as you scroll down so I don’t think the definition of repeatable headers applies in HTML.
@gabtzi I have confirm that this only works for pdf. so its not possible to used this feature in script and query reports. if you like to used the header/footer feature in query and script report better apply this patch https://github.com/frappe/frappe/pull/1517