There are several ways you can send a generated report through an Email. You can send it through the Report Format & Output Dialog, through the Route Report based on Content feature, using the Report Rule Engine and using the PDF_REPORT_CREATED event.
You can send the generated report as an attachment in an Email by selecting the "Send Email to" checkbox and specifying a valid Email address in the textbox next to it. The generated report will be Emailed if you print to a Logical Printer or direct print to a Physical Printer. If you only wish to send the Email and not print it, then you can print the report to the "No Printout or IFS PDF Archiver" Logical Printer. One thing to note is that the Email subject, body and the attachment name are predefined by the framework and can not be changed.
You can Email the generated report using the Route Report based on Content feature by using the channel type EMAIL. Here you have the flexibility of specifying your own Email subject, body and attachment name.
You can use the Route To Connect or Send Email Action Type to send a generated PDF report as an Email. When using Route To Connect Action Type you will have to use the Connector as "Mail". Here you have the flexibility of specifying your own Email subject, body and attachment name.
Using the PDF_REPORT_CREATED event and selecting Email as the Action Type you can send a report to a customer or supplier via Email. Here also you have the flexibility of specifying your own Email subject, body and attachment name.
The following is an example of how to setup the event. You can use any available event parameters (PDF_PARAMETER_1 - PDF_PARAMETER_10) you want when setting up the event provided that you have passed the necessary values for the parameters from your application code. Values for the other event parameters such as REPORT_ID, REPORT_TITLE, LANGUAGE_CODE etc. are passed through the framework.
Defining default values for event parameters of the above PDF_REPORT_CREATED event can be done in Report Definition file (.rdf) of each report. Default values for PDF_PARAMETER_1 to PDF_PARAMETER_10 can be defined this way using interface in PdfReportEventParam logical unit.
Example:
Pdf_Report_Event_Param_API.New_Parameter
('MODULE_REP', 'PDF_EVENT_PARAM_1', 'STRING', 'someone@test.com');
Pdf_Report_Event_Param_API.New_Parameter ('MODULE_REP', 'PDF_EVENT_PARAM_2',
'STRING', 'MODULE_REP');
When Print Jobs are directly created from an application functionality (such as Releasing a Customer Order), in most cases these parameter values are set from the business logic of the relevant product area & stored in Settings column of the Print Job. The default values added from the above method are overridden by the values of the Print Job Settings.
Default values are used in scenarios such as print via Print Dialog where the Print Job Settings are absent.