Page 3 of 3

Re: How to create a Single Record Report with join clause

Posted: Wed Jun 12, 2019 12:59 pm
by Janusz
if for example you just want to have prefilled file name you can do following:

Make back-up of the nurunpdf.php file.

in the nurunpdf.php replace some code as following:

Code: Select all

replace: 
$PDF->Output('nureport.pdf', 'I');      (normally it's line 54)

with 4 lines as following:

$customer='Patricia';
$date = date('Y-m-d_H-i-s');
$file_name= 'Report_'.$customer.$date.'.pdf';
$PDF->Output($file_name, 'I');
next we can progess with reading actual customer name - but before that - I need to understand very clearly your needs.

Re: How to create a Single Record Report with join clause

Posted: Wed Jun 12, 2019 11:12 pm
by nc07
Thank you, Janusz, for your time and great help.

I changed the config to:

Code: Select all

$customer='Patricia';
$date = date('Y-m-d_H-i-s');
$file_name= 'Report_'.$customer.$date.'.pdf';
$PDF->Output($file_name, 'I');
and when I download, the file automatically names to above config...all works fine..that's what I was exactly asking for.

Secondly, as u have already mentioned, to retrieve values from the fields on the form namely (po_importer & po_ic)..which I would like to output name to include.

Re: How to create a Single Record Report with join clause

Posted: Thu Jun 13, 2019 2:08 am
by Janusz
so now lets follow with the subject in the other post I started (as it is more close to that)

https://forums.nubuilder.cloud/viewtopic.php?f=21&t=9905

to the above post I will send you soon the code which will make the link of your form with the PHP code.