Column numbering.

<< Click to Display Table of Contents >>

Navigation:  Delphi HTML Report Library > Tables > Examples of using table template >

Column numbering.

Here we use fields variable to add a line between table header body

 

<template-table>

 {{{header}}}

  <tr>

   {{#fields}}

    <th>{{-index}}</th>

   {{/fields}}

 </tr>

 

{{{body}}}

</template-table>

 

Result:

 

DELPHI~1_img8

 

 

More complex example:  what if first column should be left blank and numbering should start in second column.

 

<template-table>

{{{header}}}

<tr>

 <th></th>

 {{#fields}}

  {{^-last}}

   <th>{{-index}}</th>

  {{/-last}}

 {{/fields}}

 </tr>

 

{{{body}}}

</template-table>

 

Inverted pseudo- section ^-last process all iterations except last one.