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
rootElementName
element. Withing
this element, structure the file with the elements identified in Table 1.
Element in .rsd | Required syntax | Description | In New Report from Template wizard |
---|---|---|---|
|
|
The The |
Placeholders on the Variables page. |
|
|
The |
Repetitions on the Schema Association page. |
|
|
The |
Each uniquely-named 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
<?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
andgstVersion
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 fieldsfontName
andlogoURL
become placeholder variables in the report template. - The triggers
outerGroups
,innerGroups
, androws
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.