Creating an Advanced Report Template

Velocity is a popular Java-based template engine. For a general introduction to the Velocity template language, see Apache.org.

If a dashboard needs to run reports based on the results of another report or needs to get data from Java objects, the Excel template must provide a Velocity script instead of a simple Properties worksheet described in the previous section.

The Velocity script for an Excel dashboard template normally consists of three sections:

Section 1. Global Definitions

Define the URIs for dependent reports

Section 2. Preprocessing

Add the required dashboard parameters

Initialize the dependent reports

Section 3. Rendering

Get parameter value(s)

Define the target range/row/column/cell

Get data from reports

Get data Java objects

Populate the target range/row/column/cell

Return the content of the resulting dashboard (Excel workbook)