Hi,
SmartGwt Power 4.1. build 2014-10-29 using MSSQL database.
I have a datasource where I join in multiple tables using tableClause:
When running this query, I get a count of lottery_id and a max of lottery_valid_from. However, I donīt get a result for contractor_orgno.
The reason seems to be that summaries does not work for fields which have the tableName property set.
So, if I add a tableName="or_lotteries" to the lottery_valid_from field definition, I donīt get a summary for this field either.
Is this a bug or is it intended to behave this way?
Regards
Rolf
SmartGwt Power 4.1. build 2014-10-29 using MSSQL database.
I have a datasource where I join in multiple tables using tableClause:
Code:
<DataSource ID="portlet_summary_contractor_bingo_financial_reporting"
serverType="sql"
tableName="lor_lotteries">
<fields>
<field name="lottery_id" nativeName="id" type="sequence" primaryKey="true" />
<field name="contractor_orgno" tableName="o" nativeName="orgno" title="Orgnr entreprenør" type="text" />
<field name="lottery_valid_from" detail="true" nativeName="valid_from" type="date" title="Bingo dato fra" />
<field name="lottery_valid_to" detail="true" nativeName="valid_to" type="date" title="Bingo dato til" />
</fields>
<operationBindings>
<OperationBinding operationType="fetch">
<tableClause><![CDATA[
lor_lotteries
LEFT OUTER JOIN lor_contractor_approvals c ON lor_lotteries.contractor_approval_id = c.id
LEFT OUTER JOIN organizations o ON c.organization_id = o.id
]]>
</tableClause>
<summaryFunctions>
<lottery_id>count</lottery_id>
<contractor_orgno>count</contractor_orgno>
<lottery_valid_from>max</lottery_valid_from>
</summaryFunctions>
</OperationBinding>
</operationBindings>
</DataSource>
The reason seems to be that summaries does not work for fields which have the tableName property set.
So, if I add a tableName="or_lotteries" to the lottery_valid_from field definition, I donīt get a summary for this field either.
Is this a bug or is it intended to behave this way?
Regards
Rolf
Comment