The benefit of using a template is that it allows the separation of database queries from the presentation.
A template consists of a header, row, and footer part. An optional header part is an HTML block that will be output before any report content is displayed. The row part is repeated for each row in the result set. The footer part is displayed after the result set has been processed.
A template can be defined fully in row-section if your query returns only one row. If your query returns multiple rows, separate header and footer elements can be defined.
See Commands / Templates for more info on how to use templates.