THE INFORMATION IN THIS ARTICLE APPLIES TO:
When the Auditing and Reporting module is activated, you can configure an Event Rule to generate a report, then email it or save it to a file. If you add the Generate Report Action to a Rule, you must also tell EFT what to do with the report (save it or email it or both). Using the variable %FS.REPORT_CONTENT%* in the body of email notifications adds the content of the report inline in the email in HTML format.
But what if you want to send a PDF of the report to someone? When a report is generated by the Generate Report Action, a temporary, enumerated copy of the report is created and stored locally in the EFT installation folder. The temporary copy is deleted once the Event Rule context is out of scope. Using an AWE workflow and the procedure below, you can generate a report as PDF and then add the PDF as an attachment to an email.
* %FS.REPORT_CONTENT% is used in Event Rules (such as in email notifications). %FS_REPORT_CONTENT% is used in AWE actions.
Be sure you have defined the mail server connection in EFT before attempting to send email notifications with AWE. The mail server connection is configured during installation. Otherwise, refer to step 17 in http://help.globalscape.com/help/eft7-2/mergedprojects/eft/configuring_eft_server.htm for information about configuring a connection to a mail server.
Emailing a report as a PDF attachment
- Create a new AWE workflow called EmailReports.
- Add a Send Email action to the EmailReports workflow.
- In the Attachments area, specify the report variable, %FS_REPORT_FILE%.
- Click OK, then Save and Close.
- Follow the procedure for creating a Timer Rule with the Generate Report Action.
- In the Report Action dialog box, select the report that you want to send, and then, for the Report output format, click PDF.
- Specify the date range and Advanced Options as necessary and then click OK. The Report Action is added to the Event Rule.
- Add the EmailReports AWE workflow Action to the Event Rule.
- Expand the "if failed..." section for each action and check the box for "Stop Processing this rule."
- Save the Event Rule by clicking OK and Apply.
The Event Rule should look similar to the following:
- Click Run Now at the bottom on the Event Rule to verify that the report is generated and the email attachment is sent.