Annotation Interface TemplateDef


Defines a template - element of the report structure. This annotation can be used several times on the report class if it has several templates. Additional associated logic can be declared by declaring a method annotated with TemplateDelegate.
Model object is ReportTemplate.
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Unique template code.
    Type of the output, it determines kind of the output content generated by reporting engine.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether the user should be able to choose the output type of report at runtime in UI.
    Additional parameters for custom output document rendering.
    Path to the file located on the classpath that contains template content.
    boolean
    Whether this template should be automatically used by document generation, unless user explicitly specifies other one.
    Optional file name pattern which will be used to generate the file name for the produced report.
    Table template definition for ReportOutputType.TABLE output type.
    Template engine used to process contents of text templates.
  • Element Details

    • code

      String code
      Unique template code. Use it when referring to this template programmatically.
    • outputType

      ReportOutputType outputType
      Type of the output, it determines kind of the output content generated by reporting engine. Output type should be consistent with the template file type.
    • isDefault

      boolean isDefault
      Whether this template should be automatically used by document generation, unless user explicitly specifies other one.
      Default:
      false
    • alterableOutput

      boolean alterableOutput
      Whether the user should be able to choose the output type of report at runtime in UI.
      Default:
      false
    • custom

      Additional parameters for custom output document rendering.
      Default:
      @io.jmix.reports.annotation.CustomTemplateParameters
    • outputNamePattern

      String outputNamePattern
      Optional file name pattern which will be used to generate the file name for the produced report. It can either be a constant string or contain a report parameter as a variable, for example, ${header.authorName}.xlsx.
      Default:
      ""
    • filePath

      String filePath
      Path to the file located on the classpath that contains template content. Template files are typically put to the resources source root of the same module.
      Default:
      ""
    • table

      Table template definition for ReportOutputType.TABLE output type.
      Default:
      @io.jmix.reports.annotation.TemplateTableDef(bands={})
    • templateEngine

      TemplateMarkupEngine templateEngine
      Template engine used to process contents of text templates. Used for HTML template files (with various output types).
      Default:
      FREEMARKER