TAS:Pokročilé/Pluginy/KPI/Tvorba KPI reportu/Tvorba KPI reportu z .s3db databáze (editace .xml)
Pokud tvoříme KPI report z šablony a máme data v .s3db databázi, je nutné přidávání polí realizovat přes úpravu .xml souboru v note++ (či jiném editoru).
Postup.
1) zjistím, jestli xml obsahuje potřebnou tabulku, ze které chci čerpat data, pokud ne doplním ji do <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) Doplním názvy potřebných sloupců
<Columns>
<Column Table="ServedJobStatistics" Name="Latitude" />
<Column Table="ServedJobStatistics" Name="Longitude" />
</Columns>
3) doplním formát dat přidaného sloupce
<ResultSchema>
<DataSet Name="SQL Data Source 1">
<View Name="ServedJobStatistics">
<Field Name="Latitude" Type="Decimal" />
<Field Name="Longitude" Type="Decimal" />
</View>
</DataSet>
</ResultSchema>