The KoolReport Blog

Announcements, discussions, and more for KoolReport and its extended packages.

Introduce Instant Package

In today tutorial, I would like to introduce a free and very helpful package called Instant. As you may know that KoolReport contains many useful widgets such as KoolPHP Table or Google Charts. However, the widgets can only be used within the KoolReport environment. As a result, in order to use those widgets, you need to setup a report and include those widgets in the report's view. This is troublesome and not convenient.

The Instant package will solve above problem. It let you use the Widgets instantly inside your application without creating a covering report. As a result, if you have data and would like to visualize them instantly, it become very easy.

Get started

Suppose you have below array data:

$data = array(
    array("country"=>"US","amount"=>50000),
    array("country"=>"Canada","amount"=>31000),
    array("country"=>"Mexico","amount"=>42000),
)

Those data could be from you database or you calculate from somewhere and you would like to visualize them in a PieChart, you can do as follow:

Step 1: Register the library at top of your PHP page

<?php 
    require_once "../koolreport/core/autoload.php";
    use \koolreport\instant\Widget;
    use \koolreport\widgets\google\PieChart;
?>

Step 2: Start creating PieChart anywhere with following code:

<?php 
    Widget::create(PieChart::class,array(
        "data"=>$data
    ));
?>

It is done! Easy isn't it?

The same manner can be applied to KoolPHP Tables and other types of widgets. Now you have turned KoolReport into a powerful Charts and Graphs library that you can use instantly in your web application.

If you have any question, you may reply to us of this email.

See you in the next tutorial.

Resources

  1. Instant Package Documentation
  2. Google PieChart

<3 koolreport team


KoolReport helps to analyze your data and ultimately turn them into visual reports or dynamic dashboards.

"KoolReport helps me very much in creating data report for my corporate! Keep up your good work!"

Alain Melsens

"The first use of your product. I was impressed by its easiness and powerfulness. This product is a great product and amazing."

Dr. Lew Choy Onn

"Fantastic framework for reporting!"

Greg Schneider
Get KoolReport Now, It's FREE!