ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: EPM Solutions on December 10, 2018, 09:33:10 am
-
Hello Team,
Is it possible to create custom group summaries on columns.
For Example: Check below URL for plunker
https://next.plnkr.co/edit/RSdMNBcsQcYdYwNL
Our Requirement is:
1. Portfolio Group summary row = sum of rows with BudgetClass=Portfolio minus (-) sum of rows with BudgetClass=Budget within a portfolio group
This is needed feature. Please check and give your valuable feedback on same.
-
Since summaries can't access values from other columns directly, hidden columns, formulas and column.render can be used to meet this requirement.
{
title: 'Original Budget',
nodrag: true,
nodrop: true,
minWidth: 80,
editable: false,
dataType: 'integer',
dataIndx: 'orgBudget',
summary: {
type: "all"
},
render: function(ui){
var rd = ui.rowData;
if( rd.pq_level == 0){
return rd.orgBudget2
}
}
},
{
hidden: true,
dataType: 'integer',
dataIndx: 'orgBudget2',
summary: {
type: "all"
}
},
formulas:[
["orgBudget2", function(rd){
//debugger;
if(rd.budgetClass=='Portfolio'){
return rd.orgBudget;
}
else if(rd.budgetClass=='Budget'){
return rd.orgBudget * -1;
}
}]
],
https://next.plnkr.co/edit/2tR0kOcKxXOofV73