KoolReport's Forum

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

Pivottable is blank in pdf export #1774

Open Oya Kaynar opened this topic on on Dec 18, 2020 - 3 comments

Oya Kaynar commented on Dec 18, 2020

use koolreport\pivot\widgets\PivotTable;

    PivotTable::create(array(
        "dataSource" => $this->dataStore($this->reportName),
        "rowDimension" => "row",
        "columnDimension" => "column",
        'measures' => array(
            "WEIGHT - sum",
        ), //görünmesi istenen alanlar
        'headerMap' => array(
            'WEIGHT - sum' => 'Toplam Ağırlık',
        ),
        'totalName' => 'Toplam',
        'width' => '90%',
        'map' => array(
            'dataField' => function($dataField, $fieldInfo) {
                if ($dataField === 'WEIGHT - sum')
                    return 'Atık Miktarı (Günlük Toplam)';

                return '';
            },
        ),
        'paging' => array(
            'size' => 5,
            'maxDisplayedPages' => 5,
            'sizeSelect' => array(5, 10, 20, 50, 100)
        )

    ));

setup

$dataStore = $this->getDataSource()->query($this->query)->pipe(new ColumnMeta(array(
            "WEIGHT"=>array(
                'type' => 'float',
            ))));
        $dataStore->pipe(new Pivot(array(
                "dimensions" => array(
                    "column" => "TURNAME",
                    "row" => array("WYEAR", "WMONTH")
                ),

                "aggregates"=>array(
                    "sum" => "WEIGHT",
                    "count"=>"WEIGHT"
                ),
            )
        ))->pipe($this->dataStore($this->reportName));

When I download the report, the pivottable appears blank. I am using version 4.3.2. Can you help me?

Oya Kaynar commented on Dec 19, 2020

When I PDF download the report, the pivottable appears blank. I am using version 4.3.2. Can you help me?

David Winterburn commented on Dec 21, 2020

Hi Oya,

Please open the file koolreport/pivot/widgets/PivotTable.tpl.php and search and remove the following string:

    visibility: hidden

Then try to run export again and let us know the result. Thanks!

Oya Kaynar commented on Dec 22, 2020

Solved.Thank you.

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
solved

Pivot