Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Could you please help me with issue? Export to PDF is working correctly. Thank you in andvance!
When trying to get Excel:
[Widget] PaymentTable
Message: Call to undefined method koolreport\core\DataStore::getRowGenerator()
Line: 78
File: /var/www/koolreport_2/vendor/koolreport/excel/TableRowGroupsBuilder.php
Expand
PaymentBoard.php
`
<?php
namespace App\Dashboard;
use koolreport\dashboard\Client; use koolreport\dashboard\containers\Html; use koolreport\dashboard\containers\Panel; use koolreport\dashboard\Dashboard; use koolreport\dashboard\inputs\Button; use koolreport\dashboard\inputs\Dropdown;
class PaymentBoard extends Dashboard {
protected function content()
{
return [
Html::div([
Dropdown::create("exporting")
->title("Export")
->align("right")
->items([
Dropdown::menuItem()
->text("Export to Excel")
->icon("far fa-file-excel")
->onClick(
Client::widget("PaymentTable")
->exportToXLSX("Revenue 2022")
),
Dropdown::menuItem()
->text("Export to PDF")
->icon("fa fa-file-csv")
->onClick(
Client::widget("PaymentTable")
->exportToPDF("Revenue 2022")
),
]),
])->class("text-right"),
PaymentTable::create()
->xlsxExportable(true)
->pdfExportable(true)
];
}
}
`
PaymentTable.php
`
<?php
namespace App\Dashboard;
use \koolreport\dashboard\widgets\Table; use \koolreport\dashboard\fields\Number;
class PaymentTable extends Table {
protected function dataSource()
{
return AutoMaker::table("orders")->limit(10);
}
protected function fields()
{
return [
Number::create("cards"),
];
}
}
`
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo