The Print Action is used to send a report to a printer that is accessible from a computer Ignition is installed on. Here are a list of property descriptions for the Print Action.Primary Printer - select a main printer from the dropdown list
- select a secondary printer from the dropdown list (optional).Print Mode - can
|Primary Printer||The primary method of printing the report.|
|Backup Printer| file formatVector - uses
|A backup method of printing the report. Will print using this option if the Primary Printer fails. [Optional]|
The mode to print the report in. Can be either Vector or Raster
|Vector||Uses math to draw shapes using points, lines, and curves.The most common types of vector graphics are fonts and logos. PDF is a popular vector type. Vector based graphics like SVG image files show images with no pixelation when the size is changed.| - to send to the printer.Options - print options
|Are composed of thousands of pixels or dots. Set the dpi (dots per inch). Common raster file format extensions are jpg, jpeg, png, tiff, bmp, and gif.|- will
|of the report that will print.|
|Print on both sides| - will order
|Will attempt to print on both sides of a sheet of paper, if supported by the printer.|
|Collate| - evaluates
|Orders the pages so that a complete report prints before the next copy prints, if applicable.|
|Use AutoLandscape Mode| - will orient
|Evaluates the page dimensions and determines portrait or landscape orientation.|
|Page Orientation| into portrait landscape
|The orientation of the page|
The FTP Action can be used to automatically upload your reports to a file server for backups or storage. Here are a list of property descriptions for the FTP Action.
- of where your FTP files
|Server Address| uploaded - identifies what port to use
|where the report file will be | - is the where should uploaded - choose the from the dropdown list that you want to save the report to. Username and Password - user credentials that Ignition should be using
|The port of the file transfer.|
|Folder Path| - if 'true' an encrypted link is used.Filename - by default, your Report Name with the date and time will be used as the filename, but you can change it. You can even use any of the Operators, Functions, Parameters or Tags to help you create your filename.
|of the report.|
|Username||The username that will be used to access the FTP server.|
|Password||The password that will be used to access the FTP server.|
|Will use SSL encryption if True.|
|Filename||The name of the report file. The Filename property is constructed using the expression language.| the
|title||Creating an email server|
Before you setup any reports to be emailed, an email server must be configured. To create an email server if one doesn't exist, use the 'Create new server' link. This link will take you to Configure > Email Settings on the Gateway webpage. There, you will be able to create an SMTP server. For more information, refer to Gateway Settings.
Here are a list of property descriptions for
- the sender's email address
the Email Action.
|From Address| - specify a from the dropdown list
|The Email address from which the report is sent from.|
|Mail Server| the link The page under the Configure section of the Gateway webpage will open. Here you can create an SMTP profile for your mail server. Format - choose the file format from the dropdown list that you want to save the report to.Retries - is the number of retry attempts in case Email AddressesRecipient Emails - enter recipients email addresses. To add multiple addresses, click the plus icon
|to use to email the report. If one doesn't exist, click on |Recipients Source - There are two types of Recipients Source: Email Addresses and User Roles, each having a different interface. Enter one type of Recipients Source.
| for more information on that page.|
|Format||The file format of the report.|
|Retries||The number of retry attempts if the email that was sent failed to be delivered the first time.| Method - specify how to send the email (i.e., 'To,' 'CC,' or 'BCC,') as appropriate. User Roles
Will decide how email addresses are collected. Can be either Email Addresses or User Roles.
There is a new 'ReplyTo' Email function that allows you to reply to email actions using the Email Address and User Roles. This simply adds those emails to the "ReplyTo" header of the email sent to the recipient list, so that if recipients choose to reply to that email, their reply is sent to those email addresses as well.
A table of email addresses with a method that determines how those addresses will be used. Click the plus icon on the right side of the window to add additional rows.
Subject, Filename, and Body fields have defaults, but are configurable. Each field can be edited to utilize Expressions to dynamically add content or change names.
- User Source - is a collection of users and roles that Ignition uses to authenticate against. When the User Roles Recipients Source is used, a user source must be selected from the dropdown list.
- Recipient Roles - User roles are specified here. Reports are sent to users in the specified roles. If this field is left blank, an email will be sent to users in all configured roles.
Recipients Source - Email Addresses
Recipients Source - User Roles
|Scroll HTML Exporter Ignore|
|Name||Scheduling Actions - Email|
|Addresses||A list of email addresses.|
|Method||The corresponding method of what to do with the email addresses. Options are To, CC, BCC, and ReplyTo.|
A list of roles where anyone with the given role in the specified user source with an email address will receive an email.
|Recipient User Source||The User Source to pull users from that match the Recipient Roles to get an email.|
|Recipient Roles||A list of roles to match with users. Any user that has any of the listed roles will get an email.|
|ReplyTo User Source||The User Source to pull users from that match the ReplyTo Roles that will be listed in the reply to of the email.|
|ReplyTo Roles||A list of roles to match with users. Any user that has any of the listed roles will have their email listed in the reply to of the email that gets sent out.|
|Subject||The subject of the Email. The Subject property is constructed using the expression language.|
|Attachment Filename||The name of the attached report. The Attachment Filename property is constructed using the expression language.|
|Body||The body of the email. The Body property is constructed using the expression language.|
Configuring an Email Action
- In the Schedule panel, create a Schedule to automatically email a report by clicking on the plus icon , if you don't already have one.
- Next, click on the Actions tab.
- Click on the plus icon , and select the New Email Action from the dropdown list.
- Enter the sender's email address in the From Address field.
- Select the Mail Server from the dropdown list. If one does not exist, click the 'Create new server' link to create one.
- Select the Format from the dropdown list.
- Enter the number of Retry attempts in the event the email failed to be delivered the first time.
- You can send emails to users using either Email Addresses or User Roles. Under Address Source enter either Email Addresses or User Roles.
Note, email recipients can choose to reply to the email if they prefer, since the email address is added to the 'Reply To" header of the email.
- Email Addresses - enter individual email addresses under in the Recipient and ReplyTo Emails area. To add multiple addresses, click the plus icon on the right side of the window. Next, specify the Method of how to send the email: To, CC, BCC, or ReplyTo
- User Roles - select the User Source from the dropdown in the Recipient User Source field.
- In the Recipient Roles field, begin typing a configured role and Ignition will validate it.
- In the Reply to User Source, select the User Source from the dropdown. (Optional)
- In the RepyTo Roles field, enter the role(s) you want listed in the 'ReplyTo' header of the email. (Optional)
- Enter in values for the Subject, Attachment Filename, and Body fields, or use the defaults.
Recipients and ReplyTo Emails
Recipients Source - User Roles
The handleFinishedReport function has the following arguments
- String reportName - The name of the report for which this script should run.
- String reportPath - The path to the report in your project.
- PyDictionary dataMap - The Python Dictionary containing the Parameters and Data Sources that were supplied to the report. This argument allows you to directly access Parameters and Data Sources in the report. Note that once handleFinishedReport() has been called, the report has already been generated, so changing the parameters from this function will not alter the resulting report. Instead, parameters should be altered from
- byte reportBytes - The report, presented in a byte array. The format of the report depends on the format specified in
The dataMap Argument
There is a special argument in the RunScript Action called dataMap that may be used to review the raw data that was used to generate the report. Below is a demonstration of using dataMap.
# The dataMap argument is simply a Python Dictionary with the name of each Parameter and Data Source acting as a key.
# Assuming a Report Parameter named 'shift', the value of 'shift' may be accessed with the following
# Similar syntax may be used to extract the value from a Data Source.
data = dataMap['myDataSource']
# Rows objects, while similar in nature to a dictionary, are different objects.
# Individual rows in the Data Source may be accessed by index.
firstRow = data
# getKeys() may be called on a row to list all of the column headers in the row.
firstHeader = firstRow.getKeys()
# getKeyValue() may be used to access the value of a column in the row.
firstColumnInRow = firstRow.getKeyValue(firstHeader)
|Scroll HTML Exporter Ignore|
|Name||Scheduling - Run Script|