Using DATAPACKET data outside of the DATAPACKET

<< Click to Display Table of Contents >>

Navigation:  Delphi HTML Report Library > Tables >

Using DATAPACKET data outside of the DATAPACKET

 

Rows and fields of any DATAPACKET are available in all the document by packet name (“name” attribute).

For example, we can place anywhere transposed table, using data from a packed named cust.

 

<table>

{{#cust.metadata.fields}}

<tr>

 <td><b>{{caption}}</b></td>

 {{#cust.ROWDATA}}

  <td>{{@..name}}</td>

 {{/cust.ROWDATA}}

</tr>

{{/cust.metadata.fields}}

</table>

 

Result:

 

DELPHI~1_img9

 

В example, we used a custom template element @..name. @ is a nested variable (value is used as a variable name in the next iteration), and .. a refers to a top-level iterator.