Hitachi Vantara Pentaho Community Wiki
Skip to end of metadata
Go to start of metadata

Applying a Template to Your Report

To apply a template to your report, select a template from the Templates list on the first page of the wizard.

Location of the Template definition files

The Adhoc Reporting template definitions are in the system folder of the solution repository. More specifically, if you are using the Pentaho Preconfigured Install (PCI), the Adhoc Reporting templates are in:


Creating Your Own Template

To create your own template, start by creating a new folder in /pentaho-solutions/system/waqr/templates. The fastest way to create your own template may be to copy and modify one of the templates that ships with the PCI. Each template definition has its own folder (Basic, Fall, Pentaho, Spring, etc.) Each folder must have the following files:

  1. index.xml: which identifies:
    • the name of the template as it will be displayed in the Adhoc Reporting UI
    • the name of the image file which will be displayed in the Adhoc Reporting UI
    • whether the template is "visible" or not in the Adhoc Reporting UI
    • the name of the jfreereport template file
    • the name of the xreportspec template file

(the contents of the index.xml file should be fairly self explanatory)

  1. An image file, for instance thumbnail.png. This image file is displayed in WAQR when the template is selected from the template list.
  1. A jfreereport template file, for instance jfreereport-template.xml. This template contains information that is used to specify:
    • report header/footer
    • page header/footer
    • header/footer font name
    • header/footer font size
    • header/footer text color
    • header/footer alignment
    • watermark

The Adhoc Reporting Interface's field (pageheader, pagefooter, reportheader and reportfooter) values are substituted within the template with the parser-config tags





  1. An xreportspec template file, for instance report.xreportspec. (This is a Pentaho Report Design Wizard report file.)
  • This template allows the following to be specified within a report:
    • Group Header/Footer Font Type, Font Size, Font Style, Font Color and Background Color.









    • Column Header Font Type, Font Size, Font Style, Font Color and Background Color








    • Details Font Type, Font Size, Font Style and Font Color





    • Gridlines (Horizontal or Vertical) enabled, line size and line color on the details band





    • Row Band enabled and color of band.



    • Grand Summary Label Text, Background and alignment.

<grand-totals-label>Grand Total</grand-totals-label>




To create your own template, you may want to begin by copying and modifying one of the existing templates. Much of the contents of the 2 template definition files (jfreereport-template.xml and report.xreportspec) should be obvious.

Keep in mind that, with the exception of the index.xml file, you can name the other files anything you want. However these names must be identified in the index.xml file.

Localizing Templates


Caveat Regarding Changing Templates in an Existing Report

If you edit an existing report, and change the template applied to the report, the following properties from the template will overwrite what you have specified in your report:

  • Report Description
  • Page Orientation
  • Page Format

These properties are specified on page 4 of the wizard. So after changing templates, be sure to check page 4 of the wizard to make sure that it contains the information you wanted.

Caveat Regarding Changing a Template Definition

Since templates are applied to a report when the report is created, you cannot change a template definition and expect the new properties to show up in existing reports that use this template. In order to apply the new template to your report, you will have to edit the report, leave the specified template selected, and save the report.