Reputation: 7972
I am using Laravel extension of Reportico 5.2.0 for report generation. I have a form in which I fill all the query parameters and have buttons to get output of HTML, PDF, CSV.
I am able to fetch the HTML output as it is written in a view and is returned via ajax.
I would like to get PDF when I click on PDF button.
I tried this documentation but was unsuccessful http://www.reportico.org/swsite/site/doc/reportico/tutorial_reportico.using.pkg.html#using.embedding
When I try to embed link within view following their laravel documentation here http://www.reportico.org/laravel/public/index.php/embed-links
it states ModeController Not found error
Is it possible to get PDF only when clicked on the link or via ajax?
Upvotes: 1
Views: 587
Reputation: 7972
I found the solution,
I just needed to point my url to
http://{laravel_app_url}/index.php/reportico/ajax?project={project-name}
&target_format=PDF&report={XML-file}
and change the target_format
accordingly for the output type. But the caveat is, I need to generate the HTML output before generating the PDF and CSV output.
Upvotes: 1
Reputation: 76
Also another way to do it is use the dedicated route for running a report :-
http://{laravel_app_url}/index.php/reportico/execute/{project-name}/{reportname-without-xml-extension}?target_format=PDF
And to open a report in criteria entry mode
http://{laravel_app_url}/index.php/reportico/prepare/{project-name}/{reportname-without-xml-extension}
Upvotes: 1