4. Reports

Reports in Tabulate are a way of combining your data with templates to produce outputs in the most flexible way possible. This means that you can display your data in non-tabular forms, such as HTML, LaTeX, or even GPX.

A report comprises basically a title, a set of source SQL statements, and an output template written in the Twig templating language.

By default, all reports are listed in a report named Reports, which also serves as an example for how to create other reports.

4.1. Example: Ordered HTML list

For a widgets table that has a name field, create a Report with the following template:

<h2>Widgets</h2>
<ol>
{% for widget in widgets %}
    <li>{{widget.name}}</li>
{% endfor %}
</ul>

Attach this SQL as a Report Source:

SELECT `name` FROM `widgets` ORDER BY `name`;