KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.

Color code data cell values in Pivot table and remove aggregates names from top #1005

Open Rajesh opened this topic on on Jul 23 - 3 comments

Rajesh commented on Jul 23

Hi Koolreport,

Below pivot table is built using koolreport and I would like to implement below three things into it.

1) Is it possible to color code the data cell values based on condition? I was able to achieve it in your table package but having difficulty in implementing with Pivot table.

For example, in below image for "7day Avg" Revenue column, show the data cell values in red color when "Prev Day" Revenue column value is lesser than "7day Avg" revenue. Likewise, show the values in green color when "Prev Day" Revenue column value is greater than "7day Avg" revenue.

2) Can we remove the below highlighted green color text (aggregates names) and total from the pivot table?

3) Also, is it possible to show the dimensions names in the pivot table?

In below image "CPA - A", "CPA-O" and "Dir" values are coming from column "Business Line". I want to show the header as Business Line for this values. Also, when drilled down I want to show all the respective drilled down dimensions names.

Please let me know.

Rajesh commented on Jul 26

Hi Koolreport,

Could you please respond to my question?

Thanks,

Rajesh.

Rajesh commented on Aug 7

Hi Koolreport,

Could you please let me know?

Thanks,

Rajesh.

David Winterburn commented on Aug 9

Hi Rajesh,

Sorry for the late reply! Regarding your questions:

  1. This is a bit hard as a pivot table's data structure is very different from a normal table. We will try to find a solution for you.

  2. Please inspect the element you want to hide with F12 in Chrome, Firefox and add a CSS rule display:none for those elements.

  3. There's a way to add a dimension name to a row or column header. Please try this map property in PivotTable:

PivotTable::create(array(
    ...
    'map' => array(
        ...
        'rowHeader' => function($rowHeader, $headerInfo) {
            return  $headerInfo['fieldName'] . ". " . $rowHeader;
        },

Let us know if we understand your questions correctly. Thanks!

KoolReport Is Free and Open-Source!

KoolReport is a professional php reporting framework which saves you tons of time to construct dynamic data report & dashboard.

  • Connect to various datasources such as MySQL, SQL Server, MongoDB or even from CSV or Excel file.
  • Contain series of powerful built-in data processes for your data manipulation.
  • Generate stunning charts and graphs to help you communicate data insights to your audiences effectively.
  • Integrate seamlessly with any php frameworks such as Laravel, CodeIgniter, Symfony.
Download Now and register our tutorials to get started!

Download KoolReport
help needed

Pivot