KoolReport's Forum

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

Export PDF .. reuse existing reports #2557

Open Salvatore Scalia opened this topic on on Feb 3, 2022 - 1 comments

Salvatore Scalia commented on Feb 3, 2022

Hello, i have created a number a reports . I want to export this reports in a single pdf file. is it possible combine it in one pdf ? I'm using symfony and today i send to my twig view all these reports with $report->run()->render(true) and then add {{ report |raw }} to the view.
May i reuse this reports even if i have to create for each report the ...Pdf.view.php file or there is another solution?

thanks in advance

Sebastian Morales commented on Feb 7, 2022

It's possible though not the most convenient. Pls try to create a single report (says, AllReport report) which uses all of your previous reports with ReportDataSource and pipe all needed datastores to AllReport's datastores:

https://www.koolreport.com/docs/datasources/reportdatasource/#example

Then in your AllReport's PDF view you include all of previous reports' PDF views. When you run export AllReport you should have a combined PDF file of all report's PDFs. You can even use page break between the pdf view includes:

https://www.koolreport.com/docs/export/get_started/#page-break

<?php include "path/to/Report_1_PDF.view.php"; ?>
<div class="page-break"></div>
<?php include "path/to/Report_2_PDF.view.php"; ?>
...

Let us know if you have any difficulty when trying this approach. 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
help needed

Export