Commit 6c3bb48b authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix grand totals with empty fields

parent bb98ed69
...@@ -2791,14 +2791,14 @@ CT_pivotTableDefinition.prototype.asc_set = function (api, newVal) { ...@@ -2791,14 +2791,14 @@ CT_pivotTableDefinition.prototype.asc_set = function (api, newVal) {
CT_pivotTableDefinition.prototype.asc_setRowGrandTotals = function(newVal) { CT_pivotTableDefinition.prototype.asc_setRowGrandTotals = function(newVal) {
var res; var res;
this.rowGrandTotals = newVal; this.rowGrandTotals = newVal;
if (res = this.changeGrandTotals(this.rowItems, newVal)) { if (this.rowFields && (res = this.changeGrandTotals(this.rowItems, newVal))) {
this.getRange().setOffsetLast(new AscCommonExcel.CRangeOffset(0, res)); this.getRange().setOffsetLast(new AscCommonExcel.CRangeOffset(0, res));
} }
}; };
CT_pivotTableDefinition.prototype.asc_setColGrandTotals = function(newVal) { CT_pivotTableDefinition.prototype.asc_setColGrandTotals = function(newVal) {
var res; var res;
this.colGrandTotals = newVal; this.colGrandTotals = newVal;
if (res = this.changeGrandTotals(this.colItems, newVal)) { if (this.colFields && (res = this.changeGrandTotals(this.colItems, newVal))) {
this.getRange().setOffsetLast(new AscCommonExcel.CRangeOffset(res, 0)); this.getRange().setOffsetLast(new AscCommonExcel.CRangeOffset(res, 0));
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment