Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Reading https://forums.nubuilder.cloud/viewtopic.php?f=21&t=9905 I've managed to create a button to email a report for the current record on a button press. If a custom cookie ("ReportFormID") is passed when nuRunPDF.php is called it creates a PDF file with the passed current record's ID (Report-ID.pdf) then checks if the file exists and sends the email. What I want to be able to do is push a button from an administration form that runs a query to get a list of record ID's that match a criteria (EmailStatements) and generate Statement-ID.pdf then email Statement-Month_Year.pdf.
What I need to know is if there is a way to call nuRunPDF.php and pass the report name and ID and have it generate the PDF using my existing modification?
in SQL Builder:
SELECT ........
WHERE con_part='#parts_id2#'
-------------------------------------
on the form you can create temp input box parts_id2
-----------------------
and run in sequnce ex.:
from the onclick button or any JS
$('#parts_id2').val('5d7f8b2b4333c3d').change();
nuRunReport('FR_PART_RAP');
$('#parts_id2').val('c15686241200321002').change();
nuRunReport('FR_PART_RAP');
In this specific case you would have 2 raports generated. You can generate in the loop as many raport as you want.
Additionally you would need to adjust other code to get what you want.
But sometimes reworking is more difficult then writing new module so you can consider as well tcpdf (it's part on nuBuilder)
to write your own specific raport generator. https://www.youtube.com/watch?v=m50DZkIwd-s
If you like nuBuilder, please leave a review on SourceForge