nagarajanchinnasamy/subtotal

subtotal prototype undefined

Kishan1824 opened this issue · 10 comments

Gettig an error while using subtotal.js in pivot() function.
Can not read property 'prototype' as undefined.

Please provide support for this.

error

Hi could you please share some sample code to reproduce the problem so that I understand what exactly is happening. Thanks.

Hi its solved.Its pivotjs file issue. Thanks for reply.
But now how can i hide row/column expand collapse to show subtotal
Please guide.
demo1

Ok Please Check My Code Of Binding Pivot to Div Tag With SUbtotal.

function pivotUi(id) {

    var dataClass = $.pivotUtilities.SubtotalPivotData;
    var derivers = $.pivotUtilities.derivers;
    var renderer = $.pivotUtilities.subtotal_renderers["Table With Subtotal"];

    var sum = $.pivotUtilities.aggregatorTemplates.sum;
    var numberFormat = $.pivotUtilities.numberFormat;
    var intFormat = numberFormat({ digitsAfterDecimal: 0 });

    $('#Pivot' + id).pivot($scope.Rpt_report, {
        dataClass: dataClass,
        rows: $scope.Rpt_rows,
        cols: $scope.Rpt_columns,
        aggregator: sum(intFormat)($scope.Rpt_data),
        renderer: renderer,
        rendererOptions: {
            colSubtotalDisplay: "disableExpandCollapse",
        }
    });
}

Now How can i hide expand/collapse of rows column with subtotal.
Thanks.

Hi, Glad you could solve your issues. Please check following examples:

and let me know if your requirements are met. Thanks.

Hi, I have tried all options but not working.
Is there any changes in pivotjs file or not.
And what i want is to mentioned in attach demo files.
Please check & support.

Let me know.
Thanks.
demo2
demo4

Hmmm... Interesting requirements :)

  1. In the latest version, the way to use rowSubtotalDisplay and colSubtotalDisplay has changed. Please check examples.
  2. To hide arrows, you can set arrowCollapsed and arrowExpanded to an empty string
  3. Hiding subtotal selectively at a particular sub-level is not supported currently

Hi, I have checked all option.
Now i dont need to hide arrow button for expand collapse but
I really want to hide sublevel subtotal row-wise because in big reports its not showing perfectly.
Please check my attachment of sublevel subtotal.

If possible by any way i really need it to show subtotal just by first row wise not by its sub-level wise.

Waiting for positive reply.

Thanks.

sublevel_problem

Hi,

At present its not possible to show subtotal only at a specific level. I will take this as an enhancement. But may not be implemented immediately. Will take time. This will be tracked with issue #33

Ok, i will wait for it but let me know can we set sub-level in collapeble mode by default.
If that possible then its gd for me.

Waiting for your reply.

Thanks.