SmartClient Version: v10.0p_2015-06-10/PowerEdition Deployment (built 2015-06-10)
Browser Version : IE 11.0.9600.17843
Total counts for DISTICNT select clause in the ListGrid
It looks the grid.getOriginalResultSet().getLength() is not working while we use the Distinct select clause in the ds.xml.
Example:
TABLE_A, TABLE_B (one to many)
DSRequest request = new DSRequest(DSOperationType.FETCH, "xxxFetch");
request.setProgressiveLoading(false);
grid.fetchData(criteria, new DSCallback() {
@Override
public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
System.out.println("TotalCount(ResultSet) : "+grid.getOriginalResultSet().getLength());
System.out.println("TotalCount(ResponceRow) : "+dsResponse.getTotalRows());
}
}, request);
-----------------
ds.xml (select clause only for TABLE_A fields)
<operationBinding operationType="fetch" operationId="xxxFetch">
<selectClause>DISTINCT $defaultSelectClause</selectClause>
<tableClause>TABLE_A, TABLE_B</tableClause>
<whereClause>TABLE_A.X = TABLE_B.X AND TABLE_B.Y=10 AND $defaultWhereClause</whereClause>
</operationBinding>
Please help me to get the distinct total count.
Browser Version : IE 11.0.9600.17843
Total counts for DISTICNT select clause in the ListGrid
It looks the grid.getOriginalResultSet().getLength() is not working while we use the Distinct select clause in the ds.xml.
Example:
TABLE_A, TABLE_B (one to many)
DSRequest request = new DSRequest(DSOperationType.FETCH, "xxxFetch");
request.setProgressiveLoading(false);
grid.fetchData(criteria, new DSCallback() {
@Override
public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
System.out.println("TotalCount(ResultSet) : "+grid.getOriginalResultSet().getLength());
System.out.println("TotalCount(ResponceRow) : "+dsResponse.getTotalRows());
}
}, request);
-----------------
ds.xml (select clause only for TABLE_A fields)
<operationBinding operationType="fetch" operationId="xxxFetch">
<selectClause>DISTINCT $defaultSelectClause</selectClause>
<tableClause>TABLE_A, TABLE_B</tableClause>
<whereClause>TABLE_A.X = TABLE_B.X AND TABLE_B.Y=10 AND $defaultWhereClause</whereClause>
</operationBinding>
Please help me to get the distinct total count.
Comment