A Mercury Action provides a way, from within a Mercury report, to “do something” based on a particular data row or cell.
An Action might consist of opening an external document attached to your data – say, a spec sheet on one of your products, or a sales invoice. Or an Action might involve invoking an underlying application and opening one of its forms – perhaps a customer card or an accounting transaction.
Because different systems store information in different ways, actions are directly related to the underlying database involved. For example, one system might store external documents on a network file system, another in the cloud, and a third might embed document content in the database itself.
Typically, special programming is needed to support a given action for a particular database. Therefore, the set of available actions is pre-defined in Mercury.
Actions are currently available for the following systems. See the references for detailed information on each.
Microsoft Dynamics GP | See Microsoft Dynamics GP Actions |
When a report is run, Actions are integrated with the report content. Instead of showing a data value, a designated column contains a drop-down button presenting the user with a set of available actions relevant to the particular row of data.
The example below is based on Microsoft Dynamics GP data. The first action opens the GP Vendor form (in this screenshot, the vendor is the same for all rows); the second opens the specific GP invoice; the third opens the GP purchase order form. The fourth action would open an attachment (if one existed for this particular data row).
When a report is created (or edited), you designate a single field in the report to be an Action field; this is done by choosing "Action" as the field's format. Instead of presenting data when the report is run, this field presents a drop-down button of Actions as shown in the prior screenshot.
You can use any field you wish as an action-field; in this example the developer kindly provided a field named "Actions" for us. It doesn't really matter what's in it, because we're using it to display the action-items instead of the underlying data.
Then, in the Actions tab, you add one or more actions to the report. Each action will appear as an item in the action-field's drop-down list, as shown in the "at runtime" picture above.
The list of available Actions is built into Mercury; you cannot create brand new ones yourself.
Each Action requires a set of parameters unique to that action, specific to the underlying database application.
The example that follows is based on the Microsoft Dynamics GP accounting package. One possible action is opening a document (PDF, Excel workbook, etc.) attached to GP data.
This particular action requires three parameters: the name of the Mercury database Connection object to use when retrieving the attachment content; the report fieldname containing the unique Attachment ID#; and the report fieldname containing the database where the attachment resides.
The fields containing the database-name and the AttachmentID# must be part of the report's underlying dataset; it is the responsibility of the DBA or query-writer to ensure that the proper data are available to the report.
The three required action-parameters are shown in the following screen. The other action-items (the GP drillbacks) require different parameters (not shown here).