To create a new Interactive Reporting template, you must use Report Designer to create a report with certain template-specific properties enabled. The resultant PRPT file is then deployed to the IR plugin's template directory.
The generated-content-marker attribute in the wizard group is the flag that turns a normal report into a template. This attribute can only be applied to a band (group header, group footer, details header, details footer, details, or sub-band).
RDW will insert its auto-generated content into the first band with the generated-content-marker set to true. This applies to the group header, group footer, details header, details footer, and the details bands. In the event there are more groups defined in the Report Design Wizard than defined in the template, it repeats the last defined group header and footer in the template.
Formatting styles are inherited, so any formatting applied to a band will also be applied to the elements used within it. Formatting is applied in three ways and in the following order:
- Through the template via band inheritance
- Through query data where it is defined in Pentaho Metadata
- As defined by IR users through the Interactive Reporting interface
Inheriting Styles from the Data Query
The query-metadata section of the Attributes tab contains options that determine whether formatting styles can come from the data query and be applied to the detail header, details, or detail footer band. This must be set directly on the detail header, detail footer, or details band; and the style-format option must be set to true for it to work. You must also disable any individual formatting styles (enable-style-*=true) that you don’t want to come from the query.
Padding and Grid Lines
Since the Details band is dynamically generated, you have to specify grid line and padding settings in the template definition. This is done through the wizard attribute group for the band that has the generated-content-marker enabled.
A template is not just a set of initial defaults for a report -- it is the basis for that report. So if a template is updated, completed reports that were based on that template will also change.