Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Scheduling Actions

Different Actions can be configured to run once the report has generated at the scheduled time. Each action has its own custom configuration interface to make adding and editing Actions simple. The Actions you can perform following report generation are Print, FTP, Save, Email, and Run Script. You can even have multiple actions on the same schedule. So in addition to a Save File Action, you can also select any one of the other Actions to include in the same schedule.

Before creating any Scheduling Actions, you must first create a schedule. To add a schedule, go to the Schedule panel of your report. You'll notice that the window is divided into two sections, upper and lower.  On the top, is a table containing a list of all the schedules for your report and a description of the schedule, as well as the Actions that will occur following report generation. On the bottom, there are three tabs: Schedule, Parameters, and Actions that you configure as appropriate for each schedule.

To add a new schedule, click on the plus icon   on the top-right corner of the Schedule panel. Once you create a new Schedule, now you're ready to configure your Actions. 


To create an Action, click the Actions tab, click the plus icon  and select an Action. Actions can be deleted using the trash can button , and executed immediately using the double arrow button.


 


On_this_page

 


 

 

Print Action

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.
  • Backup Printer - select a secondary printer from the dropdown list (optional).
  • Print Mode - can be either Vector or Raster file format.
    • 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. 
    • Raster - 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. 
  • Copies - number of copies to send to the printer.
  • Options - print options
    • Print on both sides - will attempt to print on both sides of a sheet of paper, if supported by the printer.
    • Collate - will order the pages so that a complete report prints before the next copy prints, if applicable.
    • Use AutoLandscape Mode - evaluates the page dimensions and determines portrait or landscape orientation.
    • Page Orientation - will orient the page into either portrait or landscape 

 

FTP Action

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. 

  • Server Address - server address of where your FTP files will be uploaded.
  • Port - identifies what port to use.
  • Folder Path - is the folder path where the file should be uploaded to. 
  • Format - choose the file format from the dropdown list that you want to save the report to.                                                                  
  • Username and Password - user credentials that Ignition should be using to access the FTP server.
  • SSL - 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.  

 

Save File Action

The Save File Action will save a copy of the report to any folder the Ignition computer has access to, locally or network shared drive. If a report is saved as HTML, it will output both <report>.html and an images folder containing a .png of the report. Both parts need to be present to view the report properly.

Here are a list of property descriptions for the Save File Action.

  • Folder Path - the folder path where the file should be saved to. This will be from the Gateway perspective.
  • Format -  choose the file format from the dropdown list that you want to save the report to.
  • 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.

 


Scroll HTML Exporter Ignore


Iulink
URLhttps://www.inductiveuniversity.com/video/scheduling-actions-save
NameScheduling Actions - Save

 



 

 

Email Action

The Email Action distributes a report via email when the report is finished executing. There is a Recipients Source property that allows you to send emails using either Email Addresses or User Roles. The 'From Address,' 'Subject', 'Body,' and 'Attachment Filename' are all configurable. The Subject, Filename, and Body editors can utilize Expressions to dynamically add content or change names.

Email Server settings must first be configured on the Gateway webpage under Configure > Networking > Email Settings page, or in Email Actions and clicking the Create new server link. Once you create and save an SMTP profile, you can test your email settings for your mail server on the Gateway webpage under Email Settings.

Here are a list of property descriptions for the Email Action.

  • From Address -  the sender's email address.
  • Mail Server - specify a mail server from the dropdown list.  If one doesn't exist, click on the Create new server link. The Email Settings 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 the email that was sent failed to be delivered the first time.
  • 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.
    • Email Addresses
      • Recipient Emails - enter recipients email addresses. To add multiple addresses, click the plus icon  on the right side of the window. 
      • Method - specify how to send the email (i.e., 'To,' 'CC,' or 'BCC,') as appropriate. 
    • User Roles
      • 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. 
  • SubjectFilename, and Body fields have defaults, but are configurable. Each field can be edited to utilize Expressions to dynamically add content or change names.

Recipients Source - Email Addresses


Recipients Source - User Roles


Scroll HTML Exporter Ignore


Iulink
URLhttps://www.inductiveuniversity.com/video/scheduling-actions-email
NameScheduling Actions - Email

 



 

 

Run Script

This Run Script Action allows you to store your report in a database, provide special email code, or anything else you can think of. Run Script exposes the function handleFinishedReport() which gives you the report name and path, a mapping of the report parameters and datasets, and the bytes in whatever format you want. 

Here are a list of property descriptions for the Run Script Action.

  • Run Script - create your script.
  • Format - choose the file format from the dropdown list that the reportBytes parameter should be.

Arguments

handleFinishedReport 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 the Parameters tab. 
  • byte[] reportBytes - The report, presented in a byte array. The format of the report depends on the format specified in the Format dropdown list. 

The dataMap Argument

dataMap may be used to review the raw data that was used to generate the report. Below is a demonstration of using dataMap.

 

Code Block
languagepy
titleUsing 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
dataMap['shift']

#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[0]

#getKeys() may be called on a row to list all of the column headers in the row. 
firstHeader = firstRow.getKeys()[0]

#getKeyValue() may be used to access the value of a column in the row.
firstColumnInRow = firstRow.getKeyValue(firstHeader)



Scroll HTML Exporter Ignore


Iulink
URLhttps://inductiveuniversity.com/video/scheduling-run-script
NameScheduling - Run Script