In this tutorial we will add page number in Qweb reports. But remember the page number only shows when the report type is PDF, In HTML format page number will not shown.
Display Page Number (x of y) in QWEB Report
Here we will display page number in this (page X of Y) format. In my case I am not using external_layout_footer in my reports. Instead have using footer class (class="footer").
<!--Report Body Section Goes Here--><div class="footer" style="position:absolute; margin:0px; padding:0px"><span class="page"/>/<span class="topage"/></div>
Read More: Hide report from print menu
Code Description
Here we uses footer class instead of external_layout_footer. And to display page numbers we used page and topage class. The output format of above code will be like this (1/2, 2/2) If you want to show page number in this format (1 of 2, 2 of 2) the use below code snippet. This will display page number at right side of the footer of the report.
<div class="footer" style="position:absolute; margin:0px; padding:0px"><span class="page"/> of <span class="topage"/></div>
10 Comments
Thanks software box
ReplyDeleteAwesome. Thanks
ReplyDeleteIts my pleasure.... Abdul halim
DeleteThanks. Useful!
ReplyDeletehow to show page number in HTML format
ReplyDeleteYour solution does not work. I have used below code. But I did not get the output.
ReplyDeletecould you please share your code..
Deletehow to sum of the page ?
ReplyDeletehow to sum of the page? plzz
ReplyDeleteit only works if u r using div class footer. i want to do this in body of the report
ReplyDelete