Report template schema definition file (.rsd)

The report template schema definition (.rsd) file defines the field, trigger, and template field trigger elements that serve as placeholders in a report template.

The .rsd file is a high level data schema file that creates the XML structure of the elements that will be included in the report template as placeholders. It is unique to report templates, and is used only when creating a report template (.4rt).

When creating a report from a template, the .rsd placeholders may be populated with data from the report design document data schema, or may be populated by static values entered by the report designer.

Creating a report template schema definition file

An .rsd file starts with a rootElementName element. Within this element, structure the file with the elements identified in Table 1.
Table 1. Available elements in the .rsd document
Element in .rsd Required syntax Description In New Report from Template wizard

Field

  • name=""
  • type=""
  • sampleValue="" (optional)

The Field element adds the variables to include as placeholders in the report template.

The type can be a string, double, integer, boolean, or date.

Placeholders on the Variables page.

Trigger

name=""

The Trigger element represents the groups to add as template repetitions to the report template. These repetitions can be mapped to the repetitions in the data schema.

Repetitions on the Schema Association page.

TemplateFieldsTrigger

groupName=""

The TemplateFieldsTrigger element specifies where a dynamic list of fields can be included in a report.When a report is created from a template and the template is expanded, the report designer can choose to populate this element from the fields in the report design data schema.

Each uniquely-named TemplateFieldsTrigger group becomes an Add Fields page.

See also Template field triggers.

Examine the template schema definition files in $GREDIR/templates to understand the different ways that a template schema definition file can be written.

Sample

The following sample is a subset of the .rsd file for the DIN 5008 Invoice (PULSE) default template:
<?xml version="1.0" encoding="utf-8"?>
<ReportSchema fileVersion="30000" gstVersion="30000" rootElementName="model">
    <Field name="showMeasures" type="boolean" sampleValue="1"/>
    <Field name="fontName" type="string"/>
    <Field name="logoURL" type="string"/>
   ...
    <Trigger name="outerGroups">
        <Trigger name="innerGroups">
            <TemplateFieldsTrigger groupName="fields"/>
            <TemplateFieldsTrigger groupName="fields"/>
            <Trigger name="rows">
                <TemplateFieldsTrigger groupName="fields"/>
            </Trigger>
        </Trigger>
    </Trigger>
</ReportSchema>

In this file:

  • fileVersion and gstVersion are determined by the version of Studio you are running. When you create a new .rsd file, these values are already set.
  • rootElementName is the name of the top node in the Data View of the report template.
  • The Boolean field showMeasures and the String fields fontName and logoURL become placeholder variables in the report template.
  • The triggers outerGroups, innerGroups, and rows become repetitions in the report template.
  • Three template triggers are created in the report template.
  • However, because all the TemplateFieldsTrigger groups have the same name (fields), only one Add Fields page is created in the New Report from Template wizard.