KoolReport's Forum

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

Why my report could not be exported? #41

Open KoolReport opened this topic on on Jul 28, 2017 - 11 comments

KoolReport commented on Jul 28, 2017

Question: If have followed installation, copying the phantomjs executable file to bin folder. But my exported pdf is blank.

Answer: Please make sure that the phantomjs executable file has the permission to run.

KoolReport commented on Jul 28, 2017

Question: Some report, export is working, some is not. Why?

Answer: Please make sure that your view which is used to export have all required tags <html>, <head>, <body>. Also make sure that all the tags is complied to the HTML/XML standard. Fail to comply, export will fail to parse the documentation that leads to fail in exporting.

tee commented on Jul 31, 2017

I have done designing my report with KoolReport and inside view has some html and css. When i clicked print to view the layout of my report, it didn't render out html and css that i applied. Is it the problem that i didn't use export package?

KoolReport commented on Jul 31, 2017

It is not. Printing report from browser is default and has nothing related to Export package. The Export package work at server-side to export your report to pdf and other formats. I think the problem of your page is from your html/css itself.

LinhNguyen commented on Sep 22, 2017

Hi KoolReport I also run a export function, the browser exported my page to pdf file but I cannot open that pdf file. I run the export on Chrome and open the pdf file also on Chrome, the browser said as in picture below: Please support in this situation Thanks.

KoolReport commented on Sep 22, 2017

Hi LinhNguyen,

Thank you very much for purchasing the KoolReport Pro. For the issue, may I know:

  1. What is your OS that you are using now? Window or Linux?
  2. Have you download the phantomjs execution file and put it in the bin folder?
  3. Make sure that phantomjs has permission to run.
  4. Have you been able to test our export example in the suite?
LinhNguyen commented on Sep 22, 2017

I run the report on Linux (Ubuntu 16.04 64bit), Apache2, PHP > 5,5. At first, without phantomjs, the report cannot export, showed me that missing the phantomjs file in bin folder. After that, I copied the phantomjs file for linux os to bin folder of export package (set the permision allow to run). At this stage, I can export to pdf file but when opening it, I met that error. I'm using ArrayDatasource for my report (data is collected before run the report).

Actually, when I run the export function in examples including in the package I downloaded, it work. But when I try to bring it to my website, I met that error. Thanks

KoolReport commented on Sep 22, 2017

So definitely the Export package has been working well. That's good. In my experience, the problem could be the html, it is strictly follow the XML standard otherwise parsing document will not work. Some of standards are:

  1. Your page must have <html>, <head> <body> tags
  2. Your page must never have open tags but not have close tags.
  3. Attributes of tags must be in format name="mydiv"

So let start small, first make a simple report page with a text only. Check if it works, then keep adding a little little content. By this way, you will know what causes issue.

Keep us post.

LinhNguyen commented on Sep 22, 2017

I ran the sample report in /examples/reports/advanced/input_and_export/index.php

When export to pdf file, the report file seems not being formated as it should be (see image below). Do I miss anything?

KoolReport commented on Sep 22, 2017

It seems to me that Bootstrap is not loaded. Please open the InputAndExport.php and put below:

    function settings()
    {
        $config = include "../../../config.php";
        return array(
            "assets"=>array(
                "path"=>"../../../assets"
            ),
            "dataSources"=>array(
                "automaker"=>$config["automaker"]
            )
        );

    }

The important lines I added is the "assets". Please try to see if it works.

LinhNguyen commented on Sep 25, 2017

Thanks for supporting me.

I also tried to put the path for assets in InputAndExport.php as you mentioned but the pdf still not exporting as expected format.

I don't know if there are any issues by how I store the package in my web server. I put 2 folder examples and koolreport inside a folder named report (set permission allow write to this folder). And I run report at this url: http://mysite.com/report/examples/reports/advanced/input_and_export/index.php

Or any issues with the package I downloaded.

Thanks.

KoolReport commented on Sep 25, 2017

Hi Linh,

That's our responsibility for license owner.

Could you please send me the url. If it is private, you may send to support@koolreport.com

Regards,

Karl

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
wiki

Export