KoolReport's Forum

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

Report Export - no PDF without settings #829

Open gkurl opened this topic on on Apr 25, 2019 - 1 comments

gkurl commented on Apr 25, 2019

Hi Guys,

I was under the impression that the settings you pass into the Koolreport Export -> pdf() method were optional. I've come across a possible bug where if I send in anything (null, empty array etc) it does not render the PDF.

However if I send in at least the setting "format" => "A4" or similar, then it will render. This is odd because the default pdf() method is setup to take an empty params array() and does get populated with

 $params["expectedLocation"] = $this->getFullUrl();
  $params["resourceWaiting"] = $this->resourceWaiting;

even if nothing is sent in. So for this not to work when you send in an empty array i.e. pdf(array()) or a $var set to an empty array() is odd - is sending the "format" a minimum requirement for the PDF to render?

This is only on export - when I run() report this seems to render fine with all data.

Please any help is appreciated.

Thanks.

David Winterburn commented on Apr 26, 2019

Hi,

Thanks for your feedback! Yes, that's not a good implementation of our current pdf exporting parameters. We should use default necessary parameters in case users don't.

For now, please add the "format" property to the exporting array. We will update the Export package regarding this case in the next version. Thanks!

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
suggestion

Export