SmartClient_v90p_2013-08-05
Load the test case below. There are two summary functions, both are "sum" for inspections and observations.
Only the first subgroup (isDesignate=0) and parent group summary row ("United States") are displayed. The summary rows for isDesignate=1 and isDesignate=2 are missing.
Load the test case below. There are two summary functions, both are "sum" for inspections and observations.
Only the first subgroup (isDesignate=0) and parent group summary row ("United States") are displayed. The summary rows for isDesignate=1 and isDesignate=2 are missing.
Code:
<!DOCTYPE html>
<html>
<head>
<title >SNTQ-13042</title>
<script type="text/javascript" >
var isomorphicDir="http://localhost:8080/isomorphic/";
var data = [
{isDesignate:0, inspectorID:12345, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:206,observations:913,lastInspectionDate:new Date(2012, 8, 13),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:0,inspectorID:67890, region:"United States", state:"Pennsylvania", city:"Butler", inspections:66,observations:null,lastInspectionDate:new Date(2013, 2,2),index:75.3, inspectionType: {id:123, name:"type1"}},
{isDesignate:1,inspectorID:88776, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:12,observations:null,lastInspectionDate:new Date(2013,2,3),index:75.3, inspectionType: {id:123, name:"type1"}},
{isDesignate:1,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Butler", inspections:206,observations:12,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:2,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:34,observations:0,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:1,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:34,observations:0,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:2,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}}
];
</script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Core.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Foundation.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Containers.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Grids.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Forms.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_DataBinding.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Drawing.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_PluginBridges.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Charts.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Tools.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
</head>
<body>
<br><br>
<script>
isc.DataSource.create({
ID: "ds",
fields: [
{name:"inspectorID", title:"Inspector ID", type:"integer", showGroupSummary: false, summaryFunction:[] },
{name:"isDesignate", title:"Is Designate", type:"boolean" },
{name:"inspections", type:"integer", title:"Number of Inspections", showGroupSummary: true,summaryFunction:["sum"]},
{name:"region", type:"text", title:"Region/Country", showGroupSummary: false,summaryFunction:[]},
{name:"observations", title:"# Observations", type:"integer", showGroupSummary: true,summaryFunction:["sum"]}
],
cacheData:data,
clientOnly: true
});
// create the actual grid object
var gridObject = isc.ListGrid.create({
dataSource: ds,
dataFetchMode : "local",
autoFetchData: true,
clientOnly: true,
width : "100%",
align : "center",
autoFitData : "vertical",
alternateRecordStyles : true,
canAddFormulaFields : true,
canAddSummaryFields : true,
canGroupBy : true,
canReorderFields : true,
showGroupSummary : true,
groupByMaxRecords : 100,
canMultiGroup : true,
useAdvancedFieldPicker : true,
advancedFieldPickerThreshold : 10
});
gridObject.groupBy(["region", "isDesignate"]);
</script>
<br><br>
</body>
</html>