For each report you need to specify a special file (template) which will be used to build the result document. The name of the template for a specific report is
<name of form>_<name of the first group of objects>. An empty object group is considered to have no name, so if the first object group is empty, the name of the template is simply equal to the name of the form (without the
When developing a template, the developer can use the object group properties that are included in the corresponding report or ancestor reports as fields. The names and types of fields will be equal to the names and types of properties on the form. If one report is a child of another report, then it should be inserted into the template as a subreport. In this case, the properties and filters in it will use the current values of the objects of the upper report as the values of their upper objects.
If at least one of the templates cannot be found when generating reports, an automatic template generation mechanism starts based on the current hierarchy: it creates a separate template for each report and adds all the necessary properties and subreports to it. At the same time, if several object groups are included in one report then the lowest group in the list will be used for detail, and a separate report group will be created with its own block for each upper group in the template, to which all the properties from this group will be added.
The LGPL technology JasperReports is used as a specific implementation of the document generation mechanism. Accordingly, templates are jrxml format files, which can be edited using the JasperSoft Studio application. At the time of generating the report, template files with the name
<template name>.jrxml are searched for in the server's current classpath (including all subdirectories). If no template file is found, the platform will generate an automatic design. When starting the server from the IDE and generating a report in preview mode, you can use the corresponding buttons to save this design to the launch directory (and the source directory), and then edit it in line with the requirements of the task (in this case, the platform will automatically sync files in the launch directory and source directory).