Page 3 of 3

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

PostPosted: Wed Jun 12, 2019 8:29 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

PostPosted: Thu Jun 13, 2019 6:42 am
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

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

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.