January 27, 2018
We have just released the Instant 2.0.0 with new features: Report Settings and new Exporter class. The Instant package is Free
to download and also be available in the KoolReport Pro 2.32.7.
Report Settings
As you may know that Instant
package helps us to use Widget
of KoolReport instantly without setting up a whole report. You can use the Widget like Table or Chart in right in your php file. However, due to not setting up report, the resources of Widget may not able to publish to assets
or public location which they can be accessed. In this new version, we allow Widget::create
function to receive the third parameter which is the settings of temporary report. This feature is extremely important if you are using modern MVC frameworks like Laravel, CodeIgniter.
Widget::create(Table::class,array(
"dataSource"=>array(
array("name"=>"Peter","age"=>35),
array("name"=>"Karl","age"=>32),
)
),array(
"assets"=>array(
"path"=>"../../public/assets",
"url"=>"/assets"
)
))
Exporter
New Exporter
class allows us to export any HTML
or PHP
file to PDF
or other format.
<?php
require_once "koolreport/autoload.php";
use \koolreport\instant\Exporter;
Exporter::export("/full/path/to/your/file.php")
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait"
))
->toBrowser("myfile.pdf");
As you can see, now it is very easy to utilize the power of Export
package to export any file to PDF. It does not limit to export the report of KoolReport.
Summary
The new version of Instant
package extends the capability of using KoolReport power outside of its environment. This adds flexibility to the usage of KoolReport for general purpose. We are working hard to make KoolReport the best library for reporting as well as extend its usefulness.
<3 koolreport team
October 30, 2017
GREAT NEWS! We have released KoolReport 1.72.8 with some important enhancements: Table Pagination, DataStore Aggregation, new Filter's Operators and more.
Table Pagination
We have added the pagination feature to koolphp\Table
. To enable this feature, we only need to add "paging"
settings to the Table:
Table::create(array(
"paging"=>array(
"pageSize"=>10,
)
))
You may view example here.
DataStore Aggregation
We have added 4 new methods to DataStore: min()
, max()
, avg()
and sum()
. So in the case you want to get total of an specific column you may do:
$totalSaleAmount = $this->dataStore("sales")->sum("amount");
Filter's Operators
The Filter
process now has "in"
and "notIn"
operators. The "in"
works like the IN operators in SQL which accept only rows with column value within an array:
->pipe(new Filter(array(
array("firstName","in",array("Peter","Karl","David")),
)))
Bug fixes
We have fixed small bug in get()
method of DataStore
. In the previous version, the method returned wrong row. Issue has been fixed now.
KoolReport Pro
KoolReport Pro 1.5.0 has been released with latest core and extended packages. The packages updated in this version are Export 2.5.0, Inputs 2.7.0 and Pivot 2.2.0.
Reminder: Today is the last day of our promotion 30% OFF for KoolReport Pro. If you are interested in KoolReport Pro licenses, please purchase now before getting too late. Don't miss it!
<3 koolreport team
October 17, 2017
We are glad to let you know that we have released Export 2.0.0. In this version, we have solved one of the mysterious issues SSL Handshake.
SSL Handshake
In the previous version, we found that Export functionality works unstably with HTTPS protocols. Most of the cases, it works well. However in some cases, it does not load resources from HTTPS such as images, javascript, css. The SSL Handshake fails that causes interruption in loading those resources. We have solved the problem in this version. If you experience this issue, please upgrade.
Plan for next version
In the next version, we plan to make exporting job work without setting up a full report. In many cases, we just want to export a normal PHP page to PDF. We hope that by adding this new feature, the Export package will be more flexible and extensible in term of use case.
<3 koolreport team
October 3, 2017
Welcome to a new package, Instant 1.0.0. The package helps us to create Widget instantly everywhere without setting up a whole report.
Recently we have received a good suggestion that we should expand the usage of KoolReport's widget outside of KoolReport's environment. For example, to add Google BarChart to a normal php page. It is possible to setup a KoolReport class and the view and include the chart but it is quite troublesome and not convenient.
Understanding the need of creating ad-hoc charts and graphs, we created this package to make thing easier. Now you can build the below chart on the fly:
<?php
require_once "koolreport\autoload.php";
use \koolreport\instant\Widget;
use \koolreport\widgets\google\BarChart;
?>
<html>
<head>
<title>Instant BarChart</title>
</head>
<body>
<?php
Widget::create(BarChart::class,array(
"data"=>array(
array("name"=>"Peter","age"=>35),
array("name"=>"Karl","age"=>32),
)
));
?>
</body>
</html>
It's Free!
The package is totally free. So you may download it now!
<3 koolreport team
September 29, 2017
We are glad to let you know that we have released new update for Inputs package. Although there are no new controls, there are some important changes that you need to be aware of.
The data
property for selectable controls.
As you know, the data
property is used to set data directly to controls. The change of data
property is applied to selectable controls which are Select
, MultiSelect
, Select2
, BSelect
, RadioList
, CheckBoxList
. The input for data
now must in associate array format with text is key "{text}"=>"{value}"
"data"=>array(
"Awesome php report"=>1,
"Great reporting framework"=>2,
"Brilliant report tools"=>3
)
Another enhancement is that you may enter options as array like below example if option text and option value are the same.
"data"=>array(
"Awesome php report",
"Great reporting framework",
"Brilliant report tools"
)
The defaultOption
The defaultOption
format follows the same as format of data
which is {text}=>{value}
. You also can have as many default option as you want. All you need is to input the text and value into the array of defaultOption. For example:
"defaultOption"=>array("--"=>"")
Not forget to mention, the RadioList and CheckBoxList now have defaultOption
property as well. It make these two controls more flexible in building options. You may use defaultOption to add some more choices beside those you have from dataStore.
Summary
Above are changes for Inputs 2.7.0 compared to the previous version. This version aims at the stability and conformity of input controls. In the next version, we will add some nice widgets. If you have any suggestion of new widget we should add, do not hesitate to let us know.
<3 koolreport team