Topic: Can downloaded pdf reports have more meaningful file names?

Can downloaded pdf reports have more meaningful file names?

Such as the report title + date/time stamp?
Thanks
Bruce

Re: Can downloaded pdf reports have more meaningful file names?

You can change it to whatever you want but remember that easily guessable filenames can be avoided using good entropy as obtains here. Rename it on file download to suit your needs. Consider how the files would stack up when mixed up with similar reports of different companies and / or different fiscal years in the same folder.

The filename for storage is computed in lines 971-974 in reporting/includes/pdf_report.inc:

            // do not use standard filenames or your sensitive company data 
            // are world readable
            $fname = $dir.'/'.random_id().'.pdf';
            $this->Output($fname, 'F');

Mail attachments and inline display will bear the file name provided in the 2nd parameter in the "new FrontReport" class instance's constructor as seen in line 73 of the same file:

    function __construct($title, $filename, $size = 'A4', $fontsize = 9, $orientation = 'P', $margins = NULL, $excelColWidthFactor = NULL)

and instantiated in each repXXX.php file.