The control file is an xml file where you map the controls defined in the template file to specific properties in view definitions in the database.
A sample control file delivered for transmittals is shown in the following image:
The following procedure describes how to create and configure a control file:
-
Open Notepad or any XML editor.
-
Add the root tag as <Control Mapping>.
-
Add the <ViewDefs> tag.
To include properties from multiple view definitions in the control file, list all the view definitions here. For example:
<ViewDef Name ="ExternalXmtlReportViewDef"/>
<ViewDef Name ="ExternalOpenXMLReportViewDef"/>
-
Create <Controls> tag to define non-tabular data. A Controls tag includes a source and target that link a control in the template file to its matching property in a view definition. For example, the following syntax links a text box with the unique tag txtName to the matching Name property in the ExternalXmtlReportViewDef view definition:
<Controls source ="ExternalXmtlReportViewDef.Name" target ="txtName"/>
-
Create a separate control tag for each non-tabular control defined in the template file.
-
You can also specify multiple properties in a single control by separating them with a comma. For example:
<Controls source = "ExternalXmtlReportViewDef.Name,ExternalXmtlReportViewDef.Description" target ="txtName"/>
-
-
If the report includes data in a table, add a <Tables> tag.
-
For each table in the report, specify the view definition name as: <Table ViewDef="View definition name">. For example, <Table ViewDef="ExternalXmtlReportViewDef">.
-
Beneath each Table tag, map the property for each column using a Column tag. The Column tag includes a source and target that link a column in the table to its matching property in the view definition. For example, the following syntax links a text box with the unique tag txtRevision to the matching Document Revision property in the view definitions defined in the preceding Table tag:
<Column source = "Document Revision" target="txtRevision"/>
-
Create a separate column tag for each tabular control defined in the template file.
-
Close all the tags.
-
-
Save the file as a .xml file when all controls are mapped.