Report template schema definition (.rsd) file

The report template schema definition (.rsd) file is used to manually add the structure of the fields and groups to a report template (.4rt).

The .rsd file is a high level data schema file, unique to templates, that is used to create the XML structure of the elements that will be included in the report template as placeholders. When creating a report from a template, the .rsd placeholders are populated with the data of the report design document provided by the data schema, or XML Schema definition (.xsd) file.

When adding the syntax to the .rsd, you must first add a rootElementName, and then structure the file with the following available elements:
Table 1. Available elements in the .rsd document
Element Required syntax Description Reference

Field

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

The field element is used to add the variables that you want to include in the report template as placeholders.

See the Variables page topic for more information.

Trigger

name=""

The Trigger element represents the groups that you want to add to the report template as template repetitions, which can be mapped to the repetitions in the data schema.

See the Schema Association page topic for more information.

TemplateFieldsTrigger

groupName=""

The TemplateFieldsTrigger element is added for fields where real field data is expected to be injected. When creating a report from a template and the template is expanded, the option to choose from the available fields in the data schema .xsd is provided.

See the following sample taken from the .rsd file for the DIN 5008 Invoice (PULSE) template, provided with Genero Studio for Genero Report Writer:
<?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>

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