Header and Footer sections

Header and footer are subsections of detail section. When used they must be placed on the very beginning (header) and very end (footer) of the detail section. This means that nothing (HTML code, RTF tags, plain text, etc.) can not be placed between <!--WB_BeginDetail--> and <!--WB_BeginHeader--> and/or between <!--WB_EndFooter--> and <!--WB_EndDetail-->. This is an example of correctly placed header and footer (marked blue):

<!--
[FormFields]
wb_command=q
wb_basename=biblio.mdb
wb_rcdset=titles
wb_changeHFon=[Year published]
wb_order=[Year published]
wb_maxrec=$all$
-->
<!--WB_BeginTemplate-->
<html>
<body>
$wbsetv[countbooks|0]
<!--WB_BeginDetail-->
<!--WB_BeginHeader-->
<strong>This is the list of titles for year $wbf[year published]</strong><br>
<!--WB_EndHeader-->

$wbf[title] - $wbf[isbn]<br>
$wbsetv[countbooks|$wbcalc[$wbgetv[countbooks]+1]]
<!--WB_BeginFooter-->
<hr>
Total books in $wbf[year published]: <strong>
$wbgetv[countbooks]</strong><hr><br>
$wbsetv[countbooks|0]
<!--WB_EndFooter-->

<!--WB_EndDetail-->
</body>
</html>
Header and Footer sections will be processed and sent to the client before and after Detail section whenever any of referent fields change it's value (to learn more about referent fields please read the explanation for input variable WB_ChangeHFOn). Header and Footer sections will also be shown at the beginning of the Detail section for first record and at the end of the Detail section for last record on the report.