After updating smartGWT libraries, generated SQL involving include fields is not working. JOINs don't get generated and included field references in the where clause are defaulting to Test_Coverage_Metric.null (where Test_Coverage_Metric is the main dataSource's tableName)
i.e.
Working SQL (differences from broken SQL marked in bold text)
Broken SQL (differences from working SQL marked bold text)
SmartClient Version: v12.1p_2021-07-04/PowerEdition Deployment (built 2021-07-04)
For reference. This is the datasource
And here is the relavent section of one of the data sources that gets included
<DataSource ID="Test_Bench" serverType="sql" tableName="Test_Bench">
<fields>
<field name="PK_Test_Bench" title="Bench ID" type="sequence" primaryKey ="true" canEdit="false" hidden="true" />
<field name="BenchName" title="Bench" type="text" lenght="63" width="150" canEdit="false" />
... other fields defined ...
</fields>
<operationBinding operationType="fetch" >
<orderClause>
CT_on_create DESC
</orderClause>
</operationBinding>
</DataSource>
Let me know if you need more info.
i.e.
Working SQL (differences from broken SQL marked in bold text)
SmartClient Version: v12.1p_2020-07-31/PowerEdition Deployment (built 2020-07-31)
SELECT
Test_Coverage_Metric.FK_Test_Coverage_Report, SUM(Test_Coverage_Metric.Covered) AS Covered, SUM(Test_Coverage_Metric.Total) AS Total, SUM(cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total, 0)) , 0) as decimal(30, 2) )) AS PercentCovered, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
FROM
Test_Coverage_Metric
JOIN
Test_Coverage_Report
ON Test_Coverage_Metric.FK_Test_Coverage_Report = Test_Coverage_Report.PK_Test_Coverage_Report
JOIN
Test_Project_Stream
ON Test_Coverage_Report.FK_Test_Project_Stream = Test_Project_Stream.PK_Test_Project_Stream
LEFT OUTER JOIN
Test_Session_Stream
ON Test_Project_Stream.FK_Test_Session_Stream = Test_Session_Stream.PK_Test_Session_Stream
LEFT OUTER JOIN
Test_Project
ON Test_Project_Stream.FK_Test_Project = Test_Project.PK_Test_Project
JOIN
Test_Bench
ON Test_Project.FK_Test_Bench = Test_Bench.PK_Test_Bench
JOIN
Test_Coverage_Category_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Category_Term = Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term
JOIN
Test_Coverage_Group_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Group_Term = Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term
WHERE
(
(
(
Test_Coverage_Group_Term.Coverage_Group IN (
'AVS', 'Core', 'H264', 'H265', 'MPEG2', 'Platform', 'Total', 'VP9'
)
)
AND Test_Coverage_Group_Term.Coverage_Group IS NOT NULL
)
AND (
(
Test_Coverage_Metric.FK_Test_Coverage_Report IN (
1621, 1622
)
)
AND Test_Coverage_Metric.FK_Test_Coverage_Report IS NOT NULL
)
AND (
(
Test_Coverage_Category_Term.Coverage_Category IN (
'Statement', 'Decision', 'All Skips', 'Debug tools', 'Defensive coding', 'Incomplete feature', 'Unreachable code', 'Unmeasurable'
)
)
AND Test_Coverage_Category_Term.Coverage_Category IS NOT NULL
)
AND (
Test_Bench.BenchName = 'Avd Bench'
AND Test_Bench.BenchName IS NOT NULL
)
AND '1'='1'
AND '1'='1'
AND (
Test_Bench.BenchName = 'Avd Bench'
AND Test_Bench.BenchName IS NOT NULL
)
AND (
Test_Project.PK_Test_Project = 18
AND Test_Project.PK_Test_Project IS NOT NULL
)
AND (
(
Test_Session_Stream.PK_Test_Session_Stream IN (
77, 78, 98, 110, 107, 109, 108
)
)
AND Test_Session_Stream.PK_Test_Session_Stream IS NOT NULL
)
)
GROUP BY
Test_Coverage_Metric.FK_Test_Coverage_Report, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
SELECT
Test_Coverage_Metric.FK_Test_Coverage_Report, SUM(Test_Coverage_Metric.Covered) AS Covered, SUM(Test_Coverage_Metric.Total) AS Total, SUM(cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total, 0)) , 0) as decimal(30, 2) )) AS PercentCovered, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
FROM
Test_Coverage_Metric
JOIN
Test_Coverage_Report
ON Test_Coverage_Metric.FK_Test_Coverage_Report = Test_Coverage_Report.PK_Test_Coverage_Report
JOIN
Test_Project_Stream
ON Test_Coverage_Report.FK_Test_Project_Stream = Test_Project_Stream.PK_Test_Project_Stream
LEFT OUTER JOIN
Test_Session_Stream
ON Test_Project_Stream.FK_Test_Session_Stream = Test_Session_Stream.PK_Test_Session_Stream
LEFT OUTER JOIN
Test_Project
ON Test_Project_Stream.FK_Test_Project = Test_Project.PK_Test_Project
JOIN
Test_Bench
ON Test_Project.FK_Test_Bench = Test_Bench.PK_Test_Bench
JOIN
Test_Coverage_Category_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Category_Term = Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term
JOIN
Test_Coverage_Group_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Group_Term = Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term
WHERE
(
(
(
Test_Coverage_Group_Term.Coverage_Group IN (
'AVS', 'Core', 'H264', 'H265', 'MPEG2', 'Platform', 'Total', 'VP9'
)
)
AND Test_Coverage_Group_Term.Coverage_Group IS NOT NULL
)
AND (
(
Test_Coverage_Metric.FK_Test_Coverage_Report IN (
1621, 1622
)
)
AND Test_Coverage_Metric.FK_Test_Coverage_Report IS NOT NULL
)
AND (
(
Test_Coverage_Category_Term.Coverage_Category IN (
'Statement', 'Decision', 'All Skips', 'Debug tools', 'Defensive coding', 'Incomplete feature', 'Unreachable code', 'Unmeasurable'
)
)
AND Test_Coverage_Category_Term.Coverage_Category IS NOT NULL
)
AND (
Test_Bench.BenchName = 'Avd Bench'
AND Test_Bench.BenchName IS NOT NULL
)
AND '1'='1'
AND '1'='1'
AND (
Test_Bench.BenchName = 'Avd Bench'
AND Test_Bench.BenchName IS NOT NULL
)
AND (
Test_Project.PK_Test_Project = 18
AND Test_Project.PK_Test_Project IS NOT NULL
)
AND (
(
Test_Session_Stream.PK_Test_Session_Stream IN (
77, 78, 98, 110, 107, 109, 108
)
)
AND Test_Session_Stream.PK_Test_Session_Stream IS NOT NULL
)
)
GROUP BY
Test_Coverage_Metric.FK_Test_Coverage_Report, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
Broken SQL (differences from working SQL marked bold text)
SmartClient Version: v12.1p_2021-07-04/PowerEdition Deployment (built 2021-07-04)
SELECT
Test_Coverage_Metric.FK_Test_Coverage_Report, SUM(Test_Coverage_Metric.Covered) AS Covered, SUM(Test_Coverage_Metric.Total) AS Total, SUM(cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total, 0)) , 0) as decimal(30, 2) )) AS PercentCovered, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
FROM
Test_Coverage_Metric
/* include field joins are missing */
JOIN
Test_Coverage_Category_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Category_Term = Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term
JOIN
Test_Coverage_Group_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Group_Term = Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term
WHERE
(
(
(
Test_Coverage_Group_Term.Coverage_Group IN (
'AVS', 'Core', 'H264', 'H265', 'MPEG2', 'Platform', 'Total', 'VP9'
)
)
AND Test_Coverage_Group_Term.Coverage_Group IS NOT NULL
)
AND (
(
Test_Coverage_Metric.FK_Test_Coverage_Report IN (
1621, 1622
)
)
AND Test_Coverage_Metric.FK_Test_Coverage_Report IS NOT NULL
)
AND (
(
Test_Coverage_Category_Term.Coverage_Category IN (
'Statement', 'Decision', 'All Skips', 'Debug tools', 'Defensive coding', 'Incomplete feature', 'Unreachable code', 'Unmeasurable'
)
)
AND Test_Coverage_Category_Term.Coverage_Category IS NOT NULL
)
AND (
Test_Coverage_Metric.null = 'Avd Bench'
AND Test_Coverage_Metric.null IS NOT NULL
)
AND '1'='1'
AND '1'='1'
AND (
Test_Coverage_Metric.null = 'Avd Bench'
AND Test_Coverage_Metric.null IS NOT NULL
)
AND (
Test_Coverage_Metric.null = 18
AND Test_Coverage_Metric.null IS NOT NULL
)
AND (
(
Test_Coverage_Metric.null IN (
77, 78, 98, 110, 107, 109, 108
)
)
AND Test_Coverage_Metric.null IS NOT NULL
)
)
GROUP BY
Test_Coverage_Metric.FK_Test_Coverage_Report, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
Test_Coverage_Metric.FK_Test_Coverage_Report, SUM(Test_Coverage_Metric.Covered) AS Covered, SUM(Test_Coverage_Metric.Total) AS Total, SUM(cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total, 0)) , 0) as decimal(30, 2) )) AS PercentCovered, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
FROM
Test_Coverage_Metric
/* include field joins are missing */
JOIN
Test_Coverage_Category_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Category_Term = Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term
JOIN
Test_Coverage_Group_Term
ON Test_Coverage_Metric.FK_Test_Coverage_Group_Term = Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term
WHERE
(
(
(
Test_Coverage_Group_Term.Coverage_Group IN (
'AVS', 'Core', 'H264', 'H265', 'MPEG2', 'Platform', 'Total', 'VP9'
)
)
AND Test_Coverage_Group_Term.Coverage_Group IS NOT NULL
)
AND (
(
Test_Coverage_Metric.FK_Test_Coverage_Report IN (
1621, 1622
)
)
AND Test_Coverage_Metric.FK_Test_Coverage_Report IS NOT NULL
)
AND (
(
Test_Coverage_Category_Term.Coverage_Category IN (
'Statement', 'Decision', 'All Skips', 'Debug tools', 'Defensive coding', 'Incomplete feature', 'Unreachable code', 'Unmeasurable'
)
)
AND Test_Coverage_Category_Term.Coverage_Category IS NOT NULL
)
AND (
Test_Coverage_Metric.null = 'Avd Bench'
AND Test_Coverage_Metric.null IS NOT NULL
)
AND '1'='1'
AND '1'='1'
AND (
Test_Coverage_Metric.null = 'Avd Bench'
AND Test_Coverage_Metric.null IS NOT NULL
)
AND (
Test_Coverage_Metric.null = 18
AND Test_Coverage_Metric.null IS NOT NULL
)
AND (
(
Test_Coverage_Metric.null IN (
77, 78, 98, 110, 107, 109, 108
)
)
AND Test_Coverage_Metric.null IS NOT NULL
)
)
GROUP BY
Test_Coverage_Metric.FK_Test_Coverage_Report, Test_Coverage_Category_Term.Coverage_Category, Test_Coverage_Group_Term.Coverage_Group
For reference. This is the datasource
<DataSource
ID="TestCoverageMetricView"
serverType="sql"
defaultTextMatchStyle="exactCase"
tableName="Test_Coverage_Metric"
>
<fields>
<!--
! Test_Coverage_Metric table definition
-->
<field name="PK_Test_Coverage_Metric" type="sequence" width="100" primaryKey="true"
title="PK_Test_Coverage_Metric"
hidden="true"
/>
<field name="FK_Test_Coverage_Report" type="integer" width="100" foreignKey="Test_Coverage_Report.PK_Test_Coverage_Report"
title="Coverage Report"
hidden="true"
displayField="Title" valueField="PK_Test_Coverage_Report"
optionDataSource="TestCoverageMetricView"
filter_outputs="PK_Test_Coverage_Report,Title,Generation_Date"
filter_sortSpecifier="-Generation_Date"
filter_groups="PK_Test_Coverage_Report,Title,Generation_Date"
filter_pickListProp_sortSpecifier="-Generation_Date"
filter_pickListProp_groupByField="PK_Test_Coverage_Report,Title,Generation_Date"
/>
<field name="FK_Test_Coverage_Group_Term" type="integer" width="100" foreignKey="Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term"
title="FK_Test_Coverage_Group_Term"
hidden="true"
displayField="Coverage_Group" valueField="PK_Test_Coverage_Group_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="PK_Test_Coverage_Group_Term,Coverage_Group"
filter_sortSpecifier="Coverage_Group"
filter_groups="PK_Test_Coverage_Group_Term,Coverage_Group"
filter_pickListProp_sortSpecifier="Coverage_Group"
filter_pickListProp_groupByField="PK_Test_Coverage_Group_Term,Coverage_Group"
/>
<field name="FK_Test_Coverage_Category_Term" type="integer" width="100" foreignKey="Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term"
title="Coverage Category FK"
hidden="true"
/>
<field name="Covered" type="integer" width="100" summaryFunctionType="sum"
title="Covered Statements"
hidden="false"
prompt="Number of code statements covered"
/>
<field name="Total" type="integer" width="100" summaryFunctionType="sum"
title="Total Statements"
hidden="false"
prompt="Number of total statements"
/>
<field name="PercentCovered" type="float" width="100" summaryFunctionType="sum"
title="Percent Covered"
hidden="false"
customSelectExpression="cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total,0)) , 0) as decimal(30,2) )"
prompt="Percentage of statements covered"
/>
<!-- aggregate txt : i.e. 86% (86/100) -->
<field name="Percent_Covered_Total" type="text" width="150"
title="Aggregate"
hidden="true"
customSelectExpression="cast( cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total,0)) , 0) as decimal(30,2) ) as varchar) + '% (' + cast(Covered as varchar) + '/' + cast(Total as varchar) + ')' "
prompt="Text represinting an aggregate of Percent%(covered/total) i.e. 86% (86/100) "
/>
<!-- Damn it, this does not work with charting
<field name="RowCnt" type="integer" customSelectExpression="DISTINCT PK_Test_Coverage_Metric" summaryFunctionType="count"
title="Row Count"
hidden="true"
/>
-->
<!--
! Test_Coverage_Report table field
-->
<field includeFrom="Test_Coverage_Report.PK_Test_Coverage_Report"
title="Report"
hidden="false"
prompt="Coverage report"
displayField="Title" valueField="PK_Test_Coverage_Report"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Report"
filter_outputs="PK_Test_Coverage_Report,Title,Generation_Date"
filter_sortSpecifier="-Generation_Date"
filter_groups="PK_Test_Coverage_Report,Title,Generation_Date"
filter_pickListProp_sortSpecifier= "-Generation_Date"
filter_pickListFields="Title,Generation_Date"
/>
<field includeFrom="Test_Coverage_Report.Title"
title="Report Name"
prompt="Coverage report name"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Report"
filter_outputs="Title,Generation_Date"
filter_sortSpecifier="-Generation_Date"
filter_groups="Title,Generation_Date"
filter_pickListProp_sortSpecifier= "-Generation_Date"
filter_pickListFields="Title,Generation_Date"
/>
<field includeFrom="Test_Coverage_Report.FK_Test_Project_Stream"
prompt="Session stream"
hidden="true"
/>
<field includeFrom="Test_Coverage_Report.Description"
prompt="Coverage report description"
optionDataSource="TestCoverageMetricView"
xxxxoptionDataSource="Test_Coverage_Report"
filter_outputs="Description"
filter_sortSpecifier="Description"
filter_groups="Description"
filter_pickListProp_sortSpecifier= "Description"
filter_pickListFields="Description"
/>
<field includeFrom="Test_Coverage_Report.Comment"
prompt="Coverage Report Comment"
displayField="Comment" valueField="Comment"
optionDataSource="TestCoverageMetricView"
filter_outputs="Comment"
filter_sortSpecifier="Comment"
filter_groups="Comment"
filter_pickListProp_sortSpecifier="Comment"
/>
<field includeFrom="Test_Coverage_Report.Generation_Date"
prompt="Date in which the coverage report was generated"
xxx_na_valueField="Generation_Date" displayField="Generation_Date"
xxx_na_optionDataSource="TestCoverageMetricView"
xxx_na_filter_outputs="Generation_Date"
xxx_na_filter_sortSpecifier="Generation_Date"
xxx_na_filter_groups="Generation_Date"
xxx_na_filter_pickListProp_sortSpecifier="Generation_Date"
/>
<field includeFrom="Test_Coverage_Report.Revision"
prompt="Coverage report firmware revision"
displayField="Revision" valueField="Revision"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Report"
filter_outputs="Revision"
filter_sortSpecifier="Revision"
filter_groups="Revision"
filter_pickListProp_sortSpecifier="Revision"
xxxxxfilter_pickListProp_groupByField="Revision"
/>
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Session_Stream.PK_Test_Session_Stream"
title="Session Stream"
hidden="false"
prompt="Session stream"
displayField="Stream_Name" valueField="PK_Test_Session_Stream"
optionDataSource="TestCoverageMetricView"
filter_outputs="Stream_Name,PK_Test_Session_Stream"
filter_sortSpecifier="Stream_Name"
filter_groups="Stream_Name,PK_Test_Session_Stream"
filter_pickListProp_sortSpecifier= "Stream_Name"
xxxfilter_pickListProp_groupByField="Stream_Name"
/>
<field name="Stream_Name" includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Session_Stream.Name"
title="Stream Name"
hidden="true"
prompt="A session stream name"
/>
<!--
! Project
-->
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.PK_Test_Project"
title="Project"
hidden="false"
prompt="Project"
valueField="PK_Test_Project" displayField="ProjName"
optionDataSource="TestCoverageMetricView"
filter_outputs="PK_Test_Project,ProjName"
filter_sortSpecifier="ProjName"
filter_groups="PK_Test_Project,ProjName"
filter_pickListProp_sortSpecifier= "ProjName"
filter_pickListProp_groupByField="PK_Test_Project,ProjName"
/>
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.ProjName"
hidden="false"
prompt="Project name"
valueField="ProjName" displayField="ProjName"
optionDataSource="TestCoverageMetricView"
filter_outputs="ProjName"
filter_sortSpecifier="ProjName"
filter_groups="ProjName"
filter_pickListProp_sortSpecifier= "ProjName"
ffffilter_pickListProp_groupByField="ProjName"
/>
<!-- Bench -->
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.Test_Bench.PK_Test_Bench"
title="Bench"
hidden="true"
prompt="Bench"
/>
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.Test_Bench.BenchName"
title="Bench Name"
hidden="true"
prompt="Bench name"
/>
<!--
! Test_Coverage_Category_Term table fields
-->
<field includeFrom="Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term"
title="Coverage Category"
hidden="false"
prompt="Coverage Category"
displayField="Coverage_Category" valueField="PK_Test_Coverage_Category_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="Coverage_Category,PK_Test_Coverage_Category_Term"
filter_sortSpecifier="Coverage_Category"
filter_groups="Coverage_Category"
filter_pickListProp_sortSpecifier= "Coverage_Category"
filter_pickListProp_groupByField="Coverage_Group,PK_Test_Coverage_Group_Term"
/>
<field includeFrom="Test_Coverage_Category_Term.Coverage_Category"
title="Coverage Category Name"
hidden="false"
prompt="Coverage Category i.e. Statement Skip"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Category_Term"
filter_outputs="Coverage_Category"
filter_sortSpecifier="Coverage_Category"
filter_groups="Coverage_Category"
filter_pickListProp_sortSpecifier="Coverage_Category"
/>
<field includeFrom="Test_Coverage_Category_Term.isSkipCategory"
hidden="true"
/>
<field includeFrom="Test_Coverage_Category_Term.parentId"
hidden="true"
/>
<!--
! Test_Coverage_Group_Term table fields
-->
<field includeFrom="Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term"
title="Coverage Group"
hidden="false"
prompt="Coverage Group (Bench defined code grouping)"
displayField="Coverage_Group" valueField="PK_Test_Coverage_Group_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="Coverage_Group,PK_Test_Coverage_Group_Term"
filter_sortSpecifier="Coverage_Group"
filter_groups="Coverage_Group"
filter_pickListProp_sortSpecifier= "Coverage_Group"
filter_pickListProp_groupByField="Coverage_Group,PK_Test_Coverage_Group_Term"
/>
<field includeFrom="Test_Coverage_Group_Term.Coverage_Group"
title="Coverage Group Name"
hidden="false"
prompt="Coverage group name"
xxxoptionDataSource="Test_Coverage_Group_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="Coverage_Group"
filter_sortSpecifier="Coverage_Group"
filter_groups="Coverage_Group"
filter_pickListProp_sortSpecifier="Coverage_Group"
/>
</fields>
</DataSource>
ID="TestCoverageMetricView"
serverType="sql"
defaultTextMatchStyle="exactCase"
tableName="Test_Coverage_Metric"
>
<fields>
<!--
! Test_Coverage_Metric table definition
-->
<field name="PK_Test_Coverage_Metric" type="sequence" width="100" primaryKey="true"
title="PK_Test_Coverage_Metric"
hidden="true"
/>
<field name="FK_Test_Coverage_Report" type="integer" width="100" foreignKey="Test_Coverage_Report.PK_Test_Coverage_Report"
title="Coverage Report"
hidden="true"
displayField="Title" valueField="PK_Test_Coverage_Report"
optionDataSource="TestCoverageMetricView"
filter_outputs="PK_Test_Coverage_Report,Title,Generation_Date"
filter_sortSpecifier="-Generation_Date"
filter_groups="PK_Test_Coverage_Report,Title,Generation_Date"
filter_pickListProp_sortSpecifier="-Generation_Date"
filter_pickListProp_groupByField="PK_Test_Coverage_Report,Title,Generation_Date"
/>
<field name="FK_Test_Coverage_Group_Term" type="integer" width="100" foreignKey="Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term"
title="FK_Test_Coverage_Group_Term"
hidden="true"
displayField="Coverage_Group" valueField="PK_Test_Coverage_Group_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="PK_Test_Coverage_Group_Term,Coverage_Group"
filter_sortSpecifier="Coverage_Group"
filter_groups="PK_Test_Coverage_Group_Term,Coverage_Group"
filter_pickListProp_sortSpecifier="Coverage_Group"
filter_pickListProp_groupByField="PK_Test_Coverage_Group_Term,Coverage_Group"
/>
<field name="FK_Test_Coverage_Category_Term" type="integer" width="100" foreignKey="Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term"
title="Coverage Category FK"
hidden="true"
/>
<field name="Covered" type="integer" width="100" summaryFunctionType="sum"
title="Covered Statements"
hidden="false"
prompt="Number of code statements covered"
/>
<field name="Total" type="integer" width="100" summaryFunctionType="sum"
title="Total Statements"
hidden="false"
prompt="Number of total statements"
/>
<field name="PercentCovered" type="float" width="100" summaryFunctionType="sum"
title="Percent Covered"
hidden="false"
customSelectExpression="cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total,0)) , 0) as decimal(30,2) )"
prompt="Percentage of statements covered"
/>
<!-- aggregate txt : i.e. 86% (86/100) -->
<field name="Percent_Covered_Total" type="text" width="150"
title="Aggregate"
hidden="true"
customSelectExpression="cast( cast( ISNULL( (Test_Coverage_Metric.Covered * 100.0 / NULLIF(Test_Coverage_Metric.Total,0)) , 0) as decimal(30,2) ) as varchar) + '% (' + cast(Covered as varchar) + '/' + cast(Total as varchar) + ')' "
prompt="Text represinting an aggregate of Percent%(covered/total) i.e. 86% (86/100) "
/>
<!-- Damn it, this does not work with charting
<field name="RowCnt" type="integer" customSelectExpression="DISTINCT PK_Test_Coverage_Metric" summaryFunctionType="count"
title="Row Count"
hidden="true"
/>
-->
<!--
! Test_Coverage_Report table field
-->
<field includeFrom="Test_Coverage_Report.PK_Test_Coverage_Report"
title="Report"
hidden="false"
prompt="Coverage report"
displayField="Title" valueField="PK_Test_Coverage_Report"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Report"
filter_outputs="PK_Test_Coverage_Report,Title,Generation_Date"
filter_sortSpecifier="-Generation_Date"
filter_groups="PK_Test_Coverage_Report,Title,Generation_Date"
filter_pickListProp_sortSpecifier= "-Generation_Date"
filter_pickListFields="Title,Generation_Date"
/>
<field includeFrom="Test_Coverage_Report.Title"
title="Report Name"
prompt="Coverage report name"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Report"
filter_outputs="Title,Generation_Date"
filter_sortSpecifier="-Generation_Date"
filter_groups="Title,Generation_Date"
filter_pickListProp_sortSpecifier= "-Generation_Date"
filter_pickListFields="Title,Generation_Date"
/>
<field includeFrom="Test_Coverage_Report.FK_Test_Project_Stream"
prompt="Session stream"
hidden="true"
/>
<field includeFrom="Test_Coverage_Report.Description"
prompt="Coverage report description"
optionDataSource="TestCoverageMetricView"
xxxxoptionDataSource="Test_Coverage_Report"
filter_outputs="Description"
filter_sortSpecifier="Description"
filter_groups="Description"
filter_pickListProp_sortSpecifier= "Description"
filter_pickListFields="Description"
/>
<field includeFrom="Test_Coverage_Report.Comment"
prompt="Coverage Report Comment"
displayField="Comment" valueField="Comment"
optionDataSource="TestCoverageMetricView"
filter_outputs="Comment"
filter_sortSpecifier="Comment"
filter_groups="Comment"
filter_pickListProp_sortSpecifier="Comment"
/>
<field includeFrom="Test_Coverage_Report.Generation_Date"
prompt="Date in which the coverage report was generated"
xxx_na_valueField="Generation_Date" displayField="Generation_Date"
xxx_na_optionDataSource="TestCoverageMetricView"
xxx_na_filter_outputs="Generation_Date"
xxx_na_filter_sortSpecifier="Generation_Date"
xxx_na_filter_groups="Generation_Date"
xxx_na_filter_pickListProp_sortSpecifier="Generation_Date"
/>
<field includeFrom="Test_Coverage_Report.Revision"
prompt="Coverage report firmware revision"
displayField="Revision" valueField="Revision"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Report"
filter_outputs="Revision"
filter_sortSpecifier="Revision"
filter_groups="Revision"
filter_pickListProp_sortSpecifier="Revision"
xxxxxfilter_pickListProp_groupByField="Revision"
/>
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Session_Stream.PK_Test_Session_Stream"
title="Session Stream"
hidden="false"
prompt="Session stream"
displayField="Stream_Name" valueField="PK_Test_Session_Stream"
optionDataSource="TestCoverageMetricView"
filter_outputs="Stream_Name,PK_Test_Session_Stream"
filter_sortSpecifier="Stream_Name"
filter_groups="Stream_Name,PK_Test_Session_Stream"
filter_pickListProp_sortSpecifier= "Stream_Name"
xxxfilter_pickListProp_groupByField="Stream_Name"
/>
<field name="Stream_Name" includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Session_Stream.Name"
title="Stream Name"
hidden="true"
prompt="A session stream name"
/>
<!--
! Project
-->
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.PK_Test_Project"
title="Project"
hidden="false"
prompt="Project"
valueField="PK_Test_Project" displayField="ProjName"
optionDataSource="TestCoverageMetricView"
filter_outputs="PK_Test_Project,ProjName"
filter_sortSpecifier="ProjName"
filter_groups="PK_Test_Project,ProjName"
filter_pickListProp_sortSpecifier= "ProjName"
filter_pickListProp_groupByField="PK_Test_Project,ProjName"
/>
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.ProjName"
hidden="false"
prompt="Project name"
valueField="ProjName" displayField="ProjName"
optionDataSource="TestCoverageMetricView"
filter_outputs="ProjName"
filter_sortSpecifier="ProjName"
filter_groups="ProjName"
filter_pickListProp_sortSpecifier= "ProjName"
ffffilter_pickListProp_groupByField="ProjName"
/>
<!-- Bench -->
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.Test_Bench.PK_Test_Bench"
title="Bench"
hidden="true"
prompt="Bench"
/>
<field includeFrom="Test_Coverage_Report.Test_Project_Stream.Test_Project.Test_Bench.BenchName"
title="Bench Name"
hidden="true"
prompt="Bench name"
/>
<!--
! Test_Coverage_Category_Term table fields
-->
<field includeFrom="Test_Coverage_Category_Term.PK_Test_Coverage_Category_Term"
title="Coverage Category"
hidden="false"
prompt="Coverage Category"
displayField="Coverage_Category" valueField="PK_Test_Coverage_Category_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="Coverage_Category,PK_Test_Coverage_Category_Term"
filter_sortSpecifier="Coverage_Category"
filter_groups="Coverage_Category"
filter_pickListProp_sortSpecifier= "Coverage_Category"
filter_pickListProp_groupByField="Coverage_Group,PK_Test_Coverage_Group_Term"
/>
<field includeFrom="Test_Coverage_Category_Term.Coverage_Category"
title="Coverage Category Name"
hidden="false"
prompt="Coverage Category i.e. Statement Skip"
optionDataSource="TestCoverageMetricView"
xxxoptionDataSource="Test_Coverage_Category_Term"
filter_outputs="Coverage_Category"
filter_sortSpecifier="Coverage_Category"
filter_groups="Coverage_Category"
filter_pickListProp_sortSpecifier="Coverage_Category"
/>
<field includeFrom="Test_Coverage_Category_Term.isSkipCategory"
hidden="true"
/>
<field includeFrom="Test_Coverage_Category_Term.parentId"
hidden="true"
/>
<!--
! Test_Coverage_Group_Term table fields
-->
<field includeFrom="Test_Coverage_Group_Term.PK_Test_Coverage_Group_Term"
title="Coverage Group"
hidden="false"
prompt="Coverage Group (Bench defined code grouping)"
displayField="Coverage_Group" valueField="PK_Test_Coverage_Group_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="Coverage_Group,PK_Test_Coverage_Group_Term"
filter_sortSpecifier="Coverage_Group"
filter_groups="Coverage_Group"
filter_pickListProp_sortSpecifier= "Coverage_Group"
filter_pickListProp_groupByField="Coverage_Group,PK_Test_Coverage_Group_Term"
/>
<field includeFrom="Test_Coverage_Group_Term.Coverage_Group"
title="Coverage Group Name"
hidden="false"
prompt="Coverage group name"
xxxoptionDataSource="Test_Coverage_Group_Term"
optionDataSource="TestCoverageMetricView"
filter_outputs="Coverage_Group"
filter_sortSpecifier="Coverage_Group"
filter_groups="Coverage_Group"
filter_pickListProp_sortSpecifier="Coverage_Group"
/>
</fields>
</DataSource>
And here is the relavent section of one of the data sources that gets included
<DataSource ID="Test_Bench" serverType="sql" tableName="Test_Bench">
<fields>
<field name="PK_Test_Bench" title="Bench ID" type="sequence" primaryKey ="true" canEdit="false" hidden="true" />
<field name="BenchName" title="Bench" type="text" lenght="63" width="150" canEdit="false" />
... other fields defined ...
</fields>
<operationBinding operationType="fetch" >
<orderClause>
CT_on_create DESC
</orderClause>
</operationBinding>
</DataSource>
Let me know if you need more info.
Comment