KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Sort function of PivotMatrix #1046

Open SOFMAN opened this topic on on Aug 16, 2019 - 3 comments

SOFMAN commented on Aug 16, 2019

I am using KoolReport in Laravel and I cannot use the Sort function of PivotMatrix, it keeps loading and shows the following error in the log.

David Winterburn commented on Aug 16, 2019

Hi there,

In Laravel, please add the following property to PivotMatrix widget:

			"scope" =>  array(
				"_token" => csrf_token(),
			),

Let us know if it works for you. Thanks!

SOFMAN commented on Aug 19, 2019

Does not work follow the same problem.

 <form id='form1' class="form-inline" method="post">
    <?php
    \koolreport\pivot\widgets\PivotMatrix::create(array(
        "dataStore" => $this->dataStore("chequesPosfechadosPivot"),
        "name" => "PivotMatrix1",
        'paging' => array(
            'size' => 10,
            'sizeSelect' => array(5, 10, 20, 50, 100)
        ),
        'rowSort' => array(
            'FECHA' => 'asc'
        ),

        "scope" =>  array(
            "_token" => csrf_token(),
        ),
        'template' => 'PivotMatrix-Bun',
        "rowDimension" => "row",
        "columnDimension" => "column",
        'showDataHeaders' => false,
        'hideTotalRow' => false,
        'hideTotalColumn' => false,
        'hideSubtotalRow' => false,
        'hideSubtotalColumn' => true,
        'rowCollapseLevels' => array(0),
        'columnCollapseLevels' => array(0),
        'totalName' => '<b>TOTAL</b>',
        'headerMap' => array(
            'VALOR - sum' => 'CLIENTE | NÚMERO DE CHEQUE',
            '0000-00-00' => 'ANTES',
            '9999-12-31' => 'DESPUÉS'
        ),
        'cssClass' => array(
            'dataCell' => function ($value, $cellInfo) {
                return 'text-right small';
            },
            'columnHeader' => function ($header, $headerInfo) {
                return 'bg-success small';
            },
            'rowHeader' => function ($header, $headerInfo) {
                return 'small';
            },


        ),
    ));

    ?>
    </form>
David Winterburn commented on Aug 20, 2019

Is there a link where we could view your page? If there is and it's private please email it to support@koolphp.net. Thanks!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

Pivot