Email a Report

Go back to the full Messaging and Scheduled Tasks documentation

Overview

The Email a Report message type can be used to send report applications as an attachment in an email or embedded in the email body. Developers are able to control the levels included, filters, and any other parameters they wish to pass. Recipients can be hard-coded or dynamic from an Address Distribution list.

Target Application

  • Select Report: Select the dictionary and report application that you wish to use in your task.
  • Additional Report Parameters: Additional parameters can be passed through the URL to filter the report or control the report behavior, such as choosing subtotal levels or defaulting a date value. Use the “Toggle Parameter Help” button to assist with creating this URL.
    Enabled Testing Mode
  • Send as Attachment: Choose to embed the report in the body of the email message or to send as an attachment.
  • Output Format: Choose the format the report should appear in them email.
  • Filename: Only used if sending the report as an attachment. If passing any parameters to the report via the additional parameters box or mapping fields, you can use these parameters in the filename as well. For example, if mapping CUSNO from a maintainer to the R001 (first runtime record selection) of the report, you can use ‘Report_${R001}.xlsx’ as the filename. You may also use built in variables to pull current timestamp or date when the task is ran. Use ${timestamp} or ${datestamp} for these respectively.
  • Map Fields to Report: Only available if the “Accepts maintainer parms” box was checked in the Task Type screen. With this option, you are able to map fields from the maintainer to the fields of your report.

Recipients

  • Recipient address source – Use a distribution list: This option allows you to use a Distribution List Retrieval to send your emails. Select the dictionary where the Distribution List Retrieval lives and the Retrieval application itself. Any additional parameters you wish to pass to filter retrieval results can be entered using the “Toggle Parameter Help” button.
  • Map distribution list fields to report: If using a distribution list, you can filter the target application report by mapping fields from the Distribution List Retrieval to the report fields. For example, you can map CUSNO (customer number) from the distribution list to a runtime record selection for CUSNO and each customer will receive their own report data.
  • Recipient address source – Use email address from web form: This option should only be used if invoking your task from a maintainer. Enter the field from the maintainer that will hold the email address to deliver the email to as well as the optional CC email address field name.
  • Map maintainer fields to distribution list: If a Distribution List is selected and the “Accepts maintainer parms” box was checked on the Task Type screen, you are able to filter the distribution list dynamically by mapping fields from the maintainer to the Distribution List Retrieval. For example, if you have a customer order form maintainer triggering a task group, you can map CUSNO (customer number) from the maintainer to filter the Distribution Lists records to only return emails for their customer number. This is a dynamic way to send emails from a maintainer.
  • Additional Addresses: Enter any hard coded email addresses here that you wish to always receive an email. Multiple addresses may be added separated by a comma.

Email Info

  • Sender: This will be the ‘from’ address when the recipient receives their email. This needs to be a working email address. If left blank, the sender address will pull from the configuration file.
  • Subject: Controls the subject of the email. If passing any parameters to the report via the additional parameters box or mapping fields, you can use these parameters in the filename as well. For example, if mapping CUSNO from a maintainer to the R001 (first runtime record selection) of the report, you can use ‘Report for ${R001}’ as the subject line. You may also use built in variables to pull current timestamp or date when the task is ran. Use ${timestamp} or ${datestamp} for these respectively.
  • Message: Hard code any text to appear in the body of the email. For example, “Thank you for the order.”
  • Attachments: List filenames (including the file extension) of any file that will be attached to the email. There are three options to attach files to emails:
    1. Files that are stored on the m-Power server in /mrcjava/job_streams/attachments can be attached to emails by simply hardcoding the filename (including the file extension) in the “File Attachment” text box. Multiple files can be listed separated by a comma.
      • Alternatively, if your target application includes a field to store the filename, you may use the fieldname substitution ${FIELD} in place of the hardcoded filename to dynamically attach files to your email.
    2. If your files are stored in another directory, you can attach them to emails by hardcoding the absolute path and filename (or field substitution) in the “File Attachment” text box.
      • For example: C:/Uploads/Orders/${FILENAME}
    3. If you are utilizing an Output Folder setup, you can reference the output directory with the syntax: queue_[queue folder name].
      • For example: I have an Output Folder Name of “SecureUpload”. I would enter queue_SecureUpload/${FILENAME}.

Review

  • Review: Overview of all options that make up your task. A great tool for troubleshooting tasks.
Updated on July 24, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support