You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have installed it yesterday. So far so good. I'm using the advanced template and I have configured the reports to be displayed in the backend. In the simplest scenario steps are:
Install using composer
Create a folder to store the reports (in my case backend/reports)
Create the reports according to documentation, for example OperationsReport
In the desire action, create an instance of the report: $report = new OperationsReport();
Render the view: return $this->renderPartial('report', ['report' => $report]); I had to use renderPartial or the layout got a little bit messed up
Those steps should work, BUT, at least in my case, I didn't have the level of control I needed over the report. So, I now follow these steps:
Steps 1 to 3 are the same
4. Create the view file, for example: OperationsReport.view. In this view I can display charts, Configure table headers, etc.
5. In the desire action, create an instance of the report: $report = new OperationsReporte();
6. Render the report: $report->run()->render();
One thing to note though, is that in this way, you have to modify your report file if you want to include bootstrap, jquery, etc:
class OperationsReport extends KoolReport
{
use \koolreport\clients\jQuery;
use \koolreport\clients\Bootstrap;
use \koolreport\clients\FontAwesome;
....
Also, you have to configure the assets array:
function settings()
{
return array(
"assets"=>array(
"path"=>"../web",
"url"=>"../",
),
...
I have installed it yesterday. So far so good. I'm using the advanced template and I have configured the reports to be displayed in the backend. In the simplest scenario steps are:
Install using composer
Create a folder to store the reports (in my case backend/reports)
Create the reports according to documentation, for example OperationsReport
In the desire action, create an instance of the report: $report = new OperationsReport();
Render the view: return $this->renderPartial('report', ['report' => $report]); I had to use renderPartial or the layout got a little bit messed up
Those steps should work, BUT, at least in my case, I didn't have the level of control I needed over the report. So, I now follow these steps:
Steps 1 to 3 are the same
4. Create the view file, for example: OperationsReport.view. In this view I can display charts, Configure table headers, etc.
5. In the desire action, create an instance of the report: $report = new OperationsReporte();
6. Render the report: $report->run()->render();
One thing to note though, is that in this way, you have to modify your report file if you want to include bootstrap, jquery, etc:
class OperationsReport extends KoolReport
{
use \koolreport\clients\jQuery;
use \koolreport\clients\Bootstrap;
use \koolreport\clients\FontAwesome;
....
Also, you have to configure the assets array:
function settings()
{
return array(
"assets"=>array(
"path"=>"../web",
"url"=>"../",
),
...
Activity
vihugarcia commentedon Apr 20, 2018
I have installed it yesterday. So far so good. I'm using the advanced template and I have configured the reports to be displayed in the backend. In the simplest scenario steps are:
Those steps should work, BUT, at least in my case, I didn't have the level of control I needed over the report. So, I now follow these steps:
Steps 1 to 3 are the same
4. Create the view file, for example: OperationsReport.view. In this view I can display charts, Configure table headers, etc.
5. In the desire action, create an instance of the report: $report = new OperationsReporte();
6. Render the report: $report->run()->render();
One thing to note though, is that in this way, you have to modify your report file if you want to include bootstrap, jquery, etc:
class OperationsReport extends KoolReport
{
use \koolreport\clients\jQuery;
use \koolreport\clients\Bootstrap;
use \koolreport\clients\FontAwesome;
....
Also, you have to configure the assets array:
function settings()
{
return array(
"assets"=>array(
"path"=>"../web",
"url"=>"../",
),
...
Otherwise you won't have styles applied.
I hope this helps.
koolphp commentedon Apr 21, 2018
Thanks Victor for your great answer.
luica20 commentedon Jan 29, 2019
Can you paste an example please..???
padmakanigem3s commentedon May 4, 2019
Hi vihugarcia,
Are you have any reference tutorial link.
koolreport commentedon Jan 17, 2020
You may have a look at
https://github.com/koolreport/yii2-example
Also we have just release a package koolreport/yii2 to facilitate creating report inside Yii2
Best regards
lloyd966 commentedon Apr 7, 2021
I installed the extension as per the instructions, and I am getting the following error:
Unknown Class – yii\base\UnknownClassException
Unable to find 'app\reports\test' in file: D:\wamp64\www\pmtts/reports/test.php. Namespace missing?
Does anyone know why I would be getting this error, and how to fix it.
Any help would be greatly appreciated