1.2. Report Template

You can create several templates for a single report in the Templates tab of the report editor. One of them must be selected as the default template in the Report structure tab.

Below is the form to add a template:

report template
  • Template code - template code for its identification.

  • Output type - report output type. It should be consistent with the template file type according to the rules described in Output format compliance matrix.

  • Template file - template file, which is loaded from the file system and saved to the database along with the report structure description.

  • Output name pattern - optional file name pattern, which will be used for the produced report download. It can either be a constant string or contain report parameter as a variable, e.g. ${header.authorName}.xlsx. More sophisticated patterns with several parameters and string concatenation can also be created as a script in any band of report structure, e.g. ${Root.title}.xlsx, where title is a result of the script:

    [['title' : ('Report for '+params['author'].firstName+' '+params['author'].lastName)]]
  • Defined with class - flag to use the template defined by a class.

  • Custom class name - template class name used if the Defined with class flag is set.