New report

Creating a new empty report #

First choose menu item Report -> New:

report_new

A new empty report with only a data source item is created:

new_report

Set the data source #

Click on the item's Templates button to show a modal of data source templates:

datasource_templates

Double click on your chosen template's screenshot or code to copy its code into the data source's editor:

datasource_template_chosen

Note: A data source item's code must be a statement that defines a variable called $datasourceSetting:

$datasourceSetting = ...

If your data source setting is of relational database type, there needs to be a SQL query as well to retrieve data from the sourced database:

sql_query

If your data source setting is of report-based type, there needs to be a datastore name as well to retrieve data from the sourced report. The name should be formatted as "result_< number >" where < number > is the data result of process < number > of the sourced report:

datastore_name

Edit the code to your likes and click on the item's Preview button to request a retrieved data preview:

datasource_preview

Add a process #

Once you have successfully got data from the data source item, click on the Add Process button at the end of the report to create a new empty process:

new_process

Click on the item's Templates button to show a modal of process templates:

process_templates

Double click on your chosen template's screenshot or code to copy its code into the process' editor:

process_template_chosen

Note: A process item's code must be a statement that defines a variable called $process:

$process = ...

Each process uses the result data of the last process (or data source) before it and outputs its processed data to the next process or visualization.

Edit the code to your likes and click on the item's Preview button to request a processed data preview:

process_preview

Add a visualization #

Once you have successfully got data from the data source or a process item, click on the Add Visualization button at the end of the report to create a new empty visualization:

new_visualization

Click on the item's Templates button to show a modal of visualization templates:

visualization_templates

Double click on your chosen template's screenshot or code to copy its code into the visualization' editor:

visualization_template_chosen

Note: A visualization item's code must be a statement that creates a KoolReport widget:

\koolreport\widgets\google\AreaChart::create(...);

All visualization template codes use example static array data. To use the result data of the last process (or data source) before a visualization change its "dataSource" line to:

    "dataSource" => $this->dataStore("result"),

Edit the code to your likes and click on the item's Preview button to request a visualized widget preview:

visualization_preview

Complete report #

Here is a simple report that includes a working data source, a working process, and a working visualization:

complete_report

Get started with KoolReport

KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.