KoolReport v.4.0.x

Repository Change #

We change our repository from koolphp/koolreport to koolreport/core. Together with this change, the composer installation command will change to:

composer require koolreport/core

Composer Friendly #

In this previous versions of KoolReport, in order to install any package we will need to download and copy it into packages folder. Installing package by composer was not possible so it is quite a pain for library upgrading.

In this version, we are proud that now all packages can be installed through composer. Our free package will be hosted with Packagist for public installation and our commercial packages are hosted with our own private server. Now in order to install packages we can make composer.json like below:

{
    "repositories":[
      {"type":"composer","url":"https://repo.koolreport.com"}
    ],
    "require":{
        "koolreport/core":"*",
        "koolreport/excel":"*",
        "koolreport/export:"*",
        "koolreport/cache":"*",
        ...
    }
}

If you are KoolReport Pro owner, your composer.json is even simpler:

{
    "repositories":[
      {"type":"composer","url":"https://repo.koolreport.com"}
    ],
    "require":{
        "koolreport/pro":"*",
    }
}

And lastly, we run the composer update to install. Simple, isn't it?

Folder structure #

We have made a little change in folder structure. Now the new structure of core KoolReport will be like below:

koolreport/
├── core/
    ├── src/
    ├── tests/
    └── autoload.php

This change needs your attention because you will need to change the library required path if you upgrade from older version to 4.x.

Furthermore, if you download a package manually, you just place it beside the core folder like below:

koolreport/
├── core/
│   ├── src/
│   ├── tests/
│   └── autoload.php
├── cube/
├── export/
└── ...

Note: Although of all above changes in folder structure, the old way of copying package into core/packages folder still work. We try to keep backward compatibility as much as possible.

Improve processes #

In this version, we have made improvement to some processes. The Group process has been fixed a rarely occurred issue. The Join process also has been improved by reducing the memory consumption and fixed the key generation issue. The Tranpose2 has been fixed the undefined column keys. So if you encountered this, please upgrade to 4.x.

There two new piping methods added which are pipeIf() and pipeTree(). The pipeIf() method will help to construct piping path base on a condition while the pipeTree() method helps to branching the flow of data. More information of these new two methods you can have a look here.

Google Chart #

We have fixed a small issue related to date conversion of Timeline chart. Also, the data with null value is now permitted to flow to google chart as google chart supports data with null.

Enhance DataSources #

We have made improvements to the KoolReport's DataSources. First we removed the parenthesis in IN operators so now if we want to use the IN statement we need to write where item in (:items). This is the same way as we do with PDODataSource. Above change is applied to MySQLDataSource, SQRSRVDataSource, PostgreSQLDataSource, OracleDataSource.

Beside, we have a big security improvements in server processing for above DataSource.

DataStore #

We have added an alias for dataStore() function. Now you can use dataStore() or just store() for faster. For example:

->pipe(new Group(...))
->pipe($this->store("result"));

The DataStore class now have a new method called toTableArray() to return data store data in table format.

Table #

In previous version, Table has issue with text data containing special html character. In this version we have carefully escaped those special character before pushing content to browser.

Card #

Card is a new widget that we have added into this new version. Card is a special box to show your important value like total sale, expense, profit or any KPI value. If you plan to build a dashboard, Card will be extremely useful for you. Some of great features are available in first version:

  1. Set value by number of with SQL.
  2. Change CSS class and CSS style for all element in Card.
  3. Showing the indicator for example percentage of decrease/increase compare to previous period.

You may view Card example here.

Amazing Theme #

Holding for quite long time from the previous version, now we are able to release a new theme for KoolReport. It is named is Amazing theme. As the name suggested, the theme is beautiful and has amazing features. You may have a look at its examples. If you own the KoolReport Pro license, you may update now to try out the this new theme.

Template Engine #

Another new feature we added to the KoolReport core is the ability to use other template engines rather than the boring built-in view file of KoolReport. Now you can use the famous template engines such as Blade, Twig or PlatesPHP to build views for your report.

  1. Use Twig in KoolReport
  2. Use PlatesPHP in KoolReport
  3. Use Blade in KoolReport

Upgrade to 4.0.x #

Moving from older version to KoolReport 4.x, you may need to change your library required path in your report. This issue only happens if you install KoolReport manually. If you previously installed KoolReport with composer, then there is nothing change in your report except for the library name change from koolphp/koolreport to koolreport/core when you install. All are backward compatible. Please contact us through our forum discussion or email us at support@koolreport.com.