Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
You could set up local export in your App.php like this:
class App extends \koolreport\dashboard\Application
{
...
protected function export()
{
return ExportHandler::create()
->storage(dirname(__DIR__)."/storage")
->csvEngine(
CSVEngine::create()
)
->xlsxEngine(
XLSXEngine::create()
)
->pdfEngine(
\koolreport\dashboard\export\LocalExport::create()
);
}
}
Please download phantomjs following instruction here. And here is the example of using export package:
https://www.koolreport.com/examples/reports/export/sakila_rental/
Let us know if you need further assistance.
I need example with dashboard!!
when i add this in my class
class MyReport extends \koolreport\KoolReport {
use \koolreport\export\Exportable;
...
} I have this error
I think it happens because I have in the class Orderlist a function that uses the data of the logged in user and it is not compatible with extends koolreport/koolreport
static function settings($user)
{
)
I use that class to show the data of the logged in user my class has functions that use in report.view.php
I changed the names but now it can't find the folder, do you have any idea why?
Fatal error: Uncaught Error: Class 'koolreport\KoolReport' not found in \htdocs\src\report\Report.php:16 Stack trace: #0 C:\xampp\htdocs\src\report\export.php(2): require_once() #1 {main} thrown in C:\xampp\htdocs\src\report\Report.php on line 16
Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\xampp\htdocs\src\report\Report.php on line 4
I think it cannot be put above the namespace, that is the only error that does not allow me to create the pdf
Please make sure you have correct path, whether you use relative path or absolute path. More information of require_once, you can find here.
when i add namespace i get following error
Fatal error: Uncaught Exception: Could not save content to temporary folder in C:\xampp\htdocs\vendor\koolreport\export\Handler.php:138 Stack trace: #0 C:\xampp\htdocs\vendor\koolreport\export\Handler.php(265): koolreport\export\Handler->saveTempContent() #1 C:\xampp\htdocs\src\report\export.php(13): koolreport\export\Handler->pdf(Array) #2 {main} thrown in C:\xampp\htdocs\vendor\koolreport\export\Handler.php on line 138
Fatal error: Uncaught Exception: Could not save content to temporary folder in C:\xampp\htdocs\vendor\koolreport\export\Handler.php:138 Stack trace: #0 C:\xampp\htdocs\vendor\koolreport\export\Handler.php(265): koolreport\export\Handler->saveTempContent() #1 C:\xampp\htdocs\src\report\export.php(13): koolreport\export\Handler->pdf(Array) #2 {main} thrown in C:\xampp\htdocs\vendor\koolreport\export\Handler.php on line 138
Normally PHP is able to save file into temporary folder, it could be "/var/tmp" (/tmp) in linux or "C:\Users It could be that your php settings is not assigned temp folder, please change it in your php.ini settings file and reset server and php. Second option, please try to turn on Let me know if it works.echo sys_get_temp_dir();
"useLocalTempFolder"=>true
.
Do you see in here:
$report->run()
->export("ReportBoard.view")
->settings([
"useLocalTempFolder"=>true
])
By the way it seems to me ->export("ReportBoard.view")
is not correct. If you have the ReportBoard.view.php then you should do ->export("ReportBoard")
only (omit the .view.php)
Fatal error: Uncaught Exception: Could not find phantomjs executed file in bin folder in C:\xampp\htdocs\vendor\koolreport\export\Handler.php:55 Stack trace: #0 C:\xampp\htdocs\vendor\koolreport\export\Handler.php(274): koolreport\export\Handler->runPhantom('C:\xampp\htdocs...', 'C:\xampp\htdocs...', 'C:\xampp\htdocs...', 'eyJmb3JtYXQiOiJ...') #1 C:\xampp\htdocs\src\report\export.php(13): koolreport\export\Handler->pdf(Array) #2 {main} thrown in C:\xampp\htdocs\vendor\koolreport\export\Handler.php on line 55
Oh, there is instruction in our export installation page. it needs phantomjs Here is come. Please download correct version of phantomjs for your system. And set the execution permission for the file.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo