pdfreport name of file

Hello
How can I, if I generate a pdfreport, name the file automatically?

Hello,
in the pdf code use
$pdf-> Output ("$output_name.pdf ", ‘I’);

the sc_pdf_output function also exists,
but I have not studied it yet,
because I use the tcpdf functions which are more complete at the moment.

I create the name of the document as follows:

$doc_name = {country_id_2}."-".{location_id}."-".[g_id];

But unfortunately I also use tcpdf.

Thanks a lot, now i work with a variable, generated by “onRecord”