KoolReport's Forum

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

Error when to exporting in pdf (Symfony), my error #2143

Open Leo Mass opened this topic on on Jun 14, 2021 - 9 comments

Leo Mass commented on Jun 14, 2021

The requested resource /fr/report/purchase/order/4148/export.php was not found on this server.

Sebastian Morales commented on Jun 15, 2021

Leo, would you pls post your export command code? Tks,

Leo Mass commented on Jun 15, 2021

export.php

Leo Mass commented on Jun 15, 2021

ShowPurchaseOrder.php

Leo Mass commented on Jun 15, 2021

ShowPurchaseOrder.view.php

Leo Mass commented on Jun 15, 2021

ShowPurchaseOrderPdf.view.php

Leo Mass commented on Jun 15, 2021

My controller

Sebastian Morales commented on Jun 15, 2021

Pls use a button for export instead of an a tag:

    <button formaction="path/to/export.php">Download PDF</button> 

Your error seems to be that the path to export.php from the current page is not correct. If the file "export.php" is in the same directory as the report's view file pls try this:

    <button formaction="<?php echo dirname($_SERVER['PHP_SELF']); ?>/export.php">Download PDF</button>

Let us know how this works for you. Tks,

Leo Mass commented on Jun 15, 2021

Here is the code for my files. Thank you for your help

Sebastian Morales commented on Jun 15, 2021

Pls check my previous answer. Next time pls post your source code in text using our editor's code buton and in one post only. Tks,

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
None yet

None