Thank you for your post.
You will need a script to save the report as PDF and attach it to an email. An example script would be:
Set Variable [ $FileName ; Value: "Invoice.pdf" ]
Save Records as PDF [ No dialog ; "$FileName" ; Records being browsed ]
Set Variable [ $PDFPath ; Value: Get (DocumentsPath) & $FileName ]
Send Mail [ Send via E-mail Client ; To: "firstname.lastname@example.org" ; Subject: "Invoice" ; Message: "Test" ; "$PDFPath" ]
The first step is setting the variable $FileName to the name of the PDF file you want to save. In this example, I named the file "Invoice.pdf".
The second step saves the file out to a PDF file. I could have left out the first step and specified "Invoice.pdf" directly. I used the "Records being browsed" option, but if this is an Invoice for one customer, then you will probably use "Current record" instead.
The third step is storing the location of the PDF file into the variable $PDFPath
The fourth step is to send the email, addressed here to email@example.com (but you could easily reference an Email field), Subject of "Invoice", Message of "Test", and attach the PDF file stored in the path $PDFPath variable.
Let me know if you need additional clarification.
Thanks for the answer all I was missing was the $PDFPath variable, I was trying to do it with the $filename variable with no success.
Already tested and implemented, Thanks again.