December 25, 2021
Reporting section is always a part of any system, sometimes it plays a crucial part. We have learnt this through hundreds of projects we did for our customers. So what is KoolReport and why you should consider having it in your great php application.
What is KoolReport?
By definition, KoolReport is an intuitive and flexible open-source PHP Reporting Framework for faster and easier data report delivery. Just like any php framework like Laravel or CodeIgniter, KoolReport provides developers a frame to code, a list of ready-made functionalities to build things. While other frameworks focus on constructing web applications, KoolReport only focuses on one thing: using PHP to construct great data reports.
Koolreport was born from the fact that data reports appear very often in almost all web applications. It is understandable because we always need to know the status of applications such as number of visitors, number of registered users or number of item sales and so on. We have built several hundred applications for our customers and 90% have report sections. In some of them, the report section is actually the main part. This is the biggest motivation for us to construct KoolReport in the first place.
There are 5 reasons that you would like to have KoolReport in your projects:
Easy
Easy to install and easy to use. You can install KoolReport by either downloading a copy and putting it inside your application or by using composer with a single command line. The structure of a report is very simple, one php class for report’s definition and one view file for report’s visualization. That’s why you can start using KoolReport in almost no-time.
Single purpose
KoolReport only does one thing and only one thing: building a good data report. Nothing more. You will not see routing, authentication or whatsoever. Is it bad? It depends on each opinion but for us, doing one thing best is better. “Make a good report” is not a simple task in fact. It includes 3 things.
First is the ability to connect to various sources and bring in data in one place. A report could be combined results from different data sources, a little from MySQL, some in Postgresql and other from CSV.
Second is the power of data processing. Data is gathered but how to fastly combine and transform them into meaningful information is the question. KoolReport contains over 30 built-in data processes which you can use with your data.
Last is data visualization capability. We have all meaningful data but without a good representation, the story could not be told. KoolReport is integrated with rich charts and graphs that come from well known libraries such as Google Chart, D3 or ChartJs for you to convey your data in the most impressive and interactive way.
Work with different environments
KoolReport can be integrated into Laravel or CodeIgniter or any MVC frameworks out and utilize their functionalities not existing in KoolReport. So KoolReport wants to be part of ecosystems, does one good thing and corporate with others, all heading to a final purpose: A great application.
Inherit experience of data report maker
Our deep experience of making data reports has been put into KoolReport. Moreover, the comments, recommendations and error report from users helps us to perfect KoolReport through many years. So using KoolReport, you are using a proven framework made by experts and growing from real use cases.
Free and open-source
Cost is always a part of the decision as always. KoolReport is released as a free and open-source library under MIT license which virtually gives you full right to use, to access and modify source-code as your own need.
So above are the top 5 reasons that you should use KoolReport inside your project. Of course, any solution has drawbacks and KoolReport will not be an exception. The reasons we give could be biased and the best way is your own experience with the framework.
November 16, 2018
LET PARTY to celebrate this amazing 3.0.0 version of KoolReport. There are many more improvements in this version than any versions released before. One of the greatest enhancements is the ability to add theme to your report and work seamlessly with other PHP Frameworks.
Stunning & stunning
We are often reminded that "Don't judge a book by its cover". Why's so? Is this because we tend to look at cover first to decide whether to read a book. In other words, the book with beautiful cover naturally catches our attention and more likely they will be read by us, won't it. The same with data report. Reading a data report will be less painful and more joyful if the report looks clean and beautiful. Koolreport may not help you to create interesting content (since it may depends on your creativity) but it surely will help you to create a beautiful one so that when look at it, people want to discover your report's content.
In this version, we would like to introduce the report theming capability. A theme when applied to your report will change the way widget rendering its contents together with color and even behaviors. As a result, your report will look very much better and will impress the viewers. You will love it, your boss will love it and your clients will love it.
We have released two basic themes Bootstrap 3
and Bootstrap 4
however more themes will come in near future. FYI, The reports in our new demos site uses theme called Amazing which will be available soon!
class MyReport extends \koolreport\KoolReport
{
use \koolreport\amazing\Theme;
}
Seamless integration
We understand that nowadays barely is an PHP application built without a framework. From the beginning, we designed KoolReport to work inside any PHP Frameworks like Laravel, CodeIgniter or Symfony. In this version, the integration of KoolReport into other frameworks goes to new level in which you may even use KoolReport's widgets inside those frameworks without initiating a report.
For example, you may create ColumnChart in Laravel's view file simply like this:
<?php ColumnChart::create(array(
"dataSource" => DB::table('orders')
->select('department', DB::raw('SUM(price) as total_sales'))
->groupBy('department')
->havingRaw('SUM(price) > ?', [2500])
->get()
));?>
Do you see that ColumnChart widget is able to receive Collection
of Laravel Framework and use it as its data source. Also, the widget does not need any further settings to be rendered on Laravel's environment. KoolReport's widgets are able to work in CodeIgniter and other framework in the same ways. More information!
Release Notes
There are much more to say about this release but we only are able to highlight the most interesting parts here. If you are interested on more details, please read our KoolReport Version 3.0.0 Release Notes.
New Examples and Documentation
We have created a new look for our Examples and Demos. Not only new look is implemented but also 70+ more examples have been added for you to get started with.
Together with new examples, we have also upgraded our Documentation as well. We have been working very hard to write every details of the framework so that you can understand it deeper and use it better.
Enjoy & Have A Great Day!
<3 koolreport team
July 16, 2018
LET PARTY to celebrate the new version of KoolReport 2.78.0. We are very proud because we thought everything was just perfect in the previous version but still this new one comes with a lot of improvements. We have been working hard to find every enhancement point even tiny. So here come the new version, all are backward compatible so you need not to worry. Please upgrade!
The core
In this version, we have reviewed all datasource classes once more time to assure they are totally safe from any security threats. Furthermore, we have improved datasources for MySQL, Postgre, SQLSRV and Oracle to reduce their response time and memory usage by enabling the connection sharing. It means that, if you have multiple queries to the same database, connection will be shared between them thus reducing the unneccessary of re-connecting time. This technique has been implemented for PdoDataSource but have not done for others.
We have improved the src($name)
function as well. Previously, this method requires us to specify the name of datasource. However we found that 80% of the cases, we have only ONE datasource. So we thought that it would be nicer to just write src()
without any parameter, KoolReport will automatically get the first datasource to use. A tiny improvement but it can free our mind and reduce the typo of datasource name which resulted in error.
We have also enhanced the SubReport feature. In the previous version, we use HTML comment tags to mark subreport section but we found that some web servers remove the HTML comment tags for the purpose of optimization which will cause big issue for SubReport so we change to use HTML element. As a result, SubReport now works perfectly.
In previous version of KoolReport, we may need to remove the resources folder when upgrade to new version. It is quite troublesome and easy to forget. In this version, we use KoolReport's version and widget's version as a factor to generate widget's url. It helps us to reduce the unneccessary work when upgrade library, KoolReport will make sure all generated resources files stay updated.
Another great improvement in this version is the ability to write Javascript function inside Widget creation. We have created an advanced jsonEncode()
function which able to detect javascript string and later turn them into javascript function at client-side. As a result, we can write PHP and Javascript in an unified block of widget creation. Furthermore, this feature will unleash features of many widgets with heavy client-side code. Please check our case of DataGrid usage in this forum post to understand better this enhancement.
Last, we have improved the event of Google Chart
and Table
. Now in those events like rowClick or itemSelect, we will receive selectedRow with associate data beside the array one. For example, you can access the row id by selectedRow[0]
or by selectedRow['id']
. This will add convenience to get data cell value for further processing.
Above are highlights, you may view the full release note.
Packages
Together with the new core, we have release below new package version:
- DataGrid 1.5.0: Adding formatValue for footer and enable data-search and and data-order feature.
- Pivot 4.1.0: Add count percentage and sum percentage to pivot process
- Cube 2.1.0: New
SuperCube
widget
- Excel 3.0.0: Change to advanced
PHPOffice/PHPSpeadsheet
library and discard the deprecated PHPExcel
library.
- ChartJS 1.2.0: Return associative array on event
- SparkLines 1.20: Add ability to write js in widget creation.
- Inputs 3.5.0: Add ability to write js in widget creation.
- Morris Chart 2.0.0: Use advanced jsonEncode() function.
- DrillDown 2.0.0: Ability to work with
Table
and ChartJS
.
Beside the new version of above packages, we have add two brand new packages
- Codeigniter 1.0.0
- Laravel 1.0.0
Those two packages are free and born to make KoolReport work seamlessly in CodeIgniter and Laravel environment. In the future, we will add more packages like those two to support KoolReport working in other PHP Frameworks like Symfony, Yii2 and etc.
KoolReport Pro
And not to forget, we released KoolReport Pro 2.78.0 containing all above released packages. If you own KoolReport Pro, you may upgrade now.
Wrap-up
Have thought that the previous version was perfect, we are proved to be wrong by this new releases with a lot of enhancements. Listening to users is the key point and we will continue to do so. We thank you so much for all of your suggestions, bug reports, your case of usages that you shared with us. That's priceless! Thank you!
If you have any questions or comments, please post on this forum topic.
Enjoy!
<3 koolreport team