Creation of KPI report from .s3db database (editing .xml)
If we are creating a KPI report from a template and we have data in the .s3db database, it is necessary to add fields by editing the .xml file in note++ (or another editor).
Procedure:
1) I find out if the xml contains the necessary table from which I want to extract data, if not I add it to <Table Name="xxx" />
<Query Type="SelectQuery" Name="ServedJobStatistics">
<Tables>
<Table Name="ServedJobStatistics" />
<Table Name="SolutionStatistics" />
<Table Name="RouteStatistics" />
<Relation Type="Inner" Parent="ServedJobStatistics" Nested="SolutionStatistics">
<KeyColumn Parent="Solution" Nested="OID" />
</Relation>
<Relation Type="Inner" Parent="ServedJobStatistics" Nested="RouteStatistics">
<KeyColumn Parent="Route" Nested="OID" />
</Relation>
</Tables>
2) I will add the names of the necessary columns
<Columns>
<Column Table="ServedJobStatistics" Name="Latitude" />
<Column Table="ServedJobStatistics" Name="Longitude" />
</Columns>
3) add the data format of the added column
<ResultSchema>
<DataSet Name="SQL Data Source 1">
<View Name="ServedJobStatistics">
<Field Name="Latitude" Type="Decimal" />
<Field Name="Longitude" Type="Decimal" />
</View>
</DataSet>
</ResultSchema>