Hi there,
We are seeing a problem where user formulas are showing grid summaries but not group summaries when the formula contains a field that doesn't calculate a summary value itself.
Use the Custom Columns example:
http://www.smartclient.com/#customColumns
Use the code below.
Click Show Formula Builder. Add a formula of A+B for Population + Area and click Save.
The New Field will display a Grid Summary value but no Group Summary value. In our application, if we change the fields in the formula to fields that do calculate their own summary stats, it seems to fix the issue. But, in this example, the formula never displays group summary values so not sure why there is that inconsistency. Also, if you click "recreate from state" in the example, it seems to fix the issue for some reason? Hopefully this gives you enough to investigate the problem.
We are seeing a problem where user formulas are showing grid summaries but not group summaries when the formula contains a field that doesn't calculate a summary value itself.
Use the Custom Columns example:
http://www.smartclient.com/#customColumns
Use the code below.
Click Show Formula Builder. Add a formula of A+B for Population + Area and click Save.
The New Field will display a Grid Summary value but no Group Summary value. In our application, if we change the fields in the formula to fields that do calculate their own summary stats, it seems to fix the issue. But, in this example, the formula never displays group summary values so not sure why there is that inconsistency. Also, if you click "recreate from state" in the example, it seems to fix the issue for some reason? Hopefully this gives you enough to investigate the problem.
Code:
var ds = isc.DataSource.get("countryDS"); isc.VLayout.create({ ID:"layout", width:500, height:250, members: [ isc.HLayout.create({ ID:"buttonLayout", width:"*", height:30, membersMargin: 10, members: [ isc.IButton.create({ ID: "formulaButton", autoFit: true, title: "Show Formula Builder", click: "countryList.addFormulaField();" }), isc.IButton.create({ ID: "summaryButton", autoFit: true, title: "Show Summary Builder", click: "countryList.addSummaryField();" }), isc.IButton.create({ ID: "stateButton", autoFit: true, title: "Recreate from State", click: function () { var state = countryList.getFieldState(true); countryList.destroy(); recreateListGrid(); countryList.setFieldState(state); } }) ] }) ] }); recreateListGrid(); function recreateListGrid() { layout.addMember(isc.ListGrid.create({ ID: "countryList", width:"100%", height:"*", alternateRecordStyles:true, cellHeight:22, dataSource: ds, autoFetchData: true, canAddFormulaFields: true, showGroupSummary:true, showGridSummary:true, canAddSummaryFields: true, fields:[ {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png" }, {name:"countryName", title:"Country"}, {name:"capital", title:"Capital"}, {name:"population", title:"Population", formatCellValue:"isc.NumberUtil.toUSString(value)",summaryFunction:"return null;"}, {name:"area", title:"Area (km²)", formatCellValue:"isc.NumberUtil.toUSString(value)"}, {name:"gdp", formatCellValue:"isc.NumberUtil.toUSString(value)"} ] })); countryList.groupBy('countryName'); }
Comment