Pro Reports - Custom name for PDF file

Completed

RH

Robin Herold

2 years ago

I would find it very handy if the download file of a Pro Report could be given an adjustable name or, for example, be named after the name of the site / customer

Activity

T

Trev

2 years ago

Yes ! To be named after name of the website would be very helpful !

KS

Ken Sim

last year

I agree. Sending out a report to the client with a file name of por-report-xxxx-xx-xx.pdf looks very canned and impersonal to the client. This report would hold more value to the client if the report was more personalized to name the pdf like like "clinet-name_custom-care-report_xxxx-xx-xx". To the client, it would feel like it was tailored for them.

KC

Keith Crain ( MainWP Staff )

last year

Just a tip, this is already achievable as MainWP Sits. simply use this code snippet here within the MainWP Custom Dashboard Extension & tweak the "return line" to your liking:

https://gist.github.com/kwcjr/1af340122e747bba706892eb7ca78097

return $website->name . '-' . 'new-file-name.pdf';
return $website->name . '-' . 'what-ever-you-want.pdf';

This will output 'child-site-name-what-ever-you-want.pdf'

P.s. to add the date back onto the file name you will need to pull in that variable like so:

$suffix = date( 'Y-m-d' ); // 2020-11-11

return $website->name . '-' . 'new-file-name' . '-' . $suffix . '.pdf';
BR

Bogdan Rapaić

last year

Added in Pro Reports 4.1

BR

Bogdan Rapaić changed the status to Completed

last year


Powered by Convas