The first step in understanding and customizing EDD exports in EQuIS is understanding the Format Export file (*-export.xml). The *-export.xml file is one of the files that defines the EQuIS format (along with the *.xsd file, the *.vb file, the *-enum.xml file, etc.). For the *-export.xml file to be used by the format, the *-export.xml file must exist in the same directory as the Format Definition file (*.xsd) and the *.xsd file must include a <edd:export>node within the <xs:appinfo> node that indicates the name of the *-export.xml file (see figure below). Note that the reference to the export file does not need to include the ".xml" extension; the extension is assumed to be either ".xml" (a plain text XML file) or ".xme" (an encrypted XML file).
Particularly for large or complex EDD formats, it is often useful to have a number of different types of exports. For example, the EFWEDD format includes one export for lab EDDs and another for field EDDs. Each of these different exports is defined within the same *-export.xml file as a "report".
The root node (also referred to as the document node) of the *-export.xml file must be the <reports> node. The <reports>node may contain one or more <report> nodes. Each <report> node must contain exactly two child nodes: <parameters> and <commands>.
The <parameters> node contains zero or more <param> nodes that define the parameters used for the report. The information for each parameter is very similar to the information defined for other reports in the ST_REPORT_PARAMETER table. The parameter definitions are used to automatically generate the input parameters seen by the user when running the report. The figure details the parameters that are defined for the "EFWEDD LAB EDD" Report.
The <commands> node within a report contains one or more <command> nodes. Each <command>node represents a separate SQL command (e.g., query) that will be executed against the database using the parameter values defined by the user. The output of the query will be used to populate the section of the EDD indicated in the table_name attribute of the <command> node. The connection_type attribute may be used to define SQL syntax for a specific type of database (e.g., Microsoft SQL Server).
If the syntax is specific to Microsoft SQL Server, then the attribute would be connection_type="SqlConnection". If the syntax is generic (and will work for any type of database), then the connection_type attribute may be omitted. The number of <command> nodes will depend on the number of sections of the EDD being populated (and whether or not the syntax is different for different types of databases). The content of the<command> node is an XML <CDATA>node that contains the actual SQL. The figure shows the commands for populating the "EFW2LabSMP" EDD section of the EFWEDD Lab EDD Report.
Copyright © 2020 EarthSoft, Inc • Modified: 08 Apr 2020