KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Export inside view.php #2258

Closed Aljaz Ketis opened this topic on on Aug 12, 2021 - 3 comments

Aljaz Ketis commented on Aug 12, 2021

Is it possible to inside MyReport.view.php create a button that will export the same report in excel (MyReportExcel.view.php) ? Currently i have to call an action of laravel, so that i initiate a new MyReport run all the queries again and then export it, but i dont want to do that since i already am displaying all the needed data inside MyReport.view.php.

Sebastian Morales commented on Aug 12, 2021

Since our exports are all server side the report must be run again to generate data for exporting. But there's a Cache package which could help you run the report faster using cached results if there's no change in report's setup:

https://www.koolreport.com/docs/cache/overview/

Aljaz Ketis commented on Aug 12, 2021

But i am using the same data as inside Web and I am inside ReportItself, i can see that you have a method called Export and ExportToExcell, can't i run it inside the view? Maybe a future improvement, becouse you always want to export the data you will show on web, at least in a .xls format

Sebastian Morales commented on Aug 16, 2021

Like I said, most of our exports (pdf, excel, csv, etc) are server-side, i.e it needs request back to server and server processing. There're some client-side exporting Datagrid package's DataTables widget:

https://www.koolreport.com/examples/reports/datagrid/plugins/

You can use that if you only want to export a datastore. Rgds,

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

Export