Specify a Trip Sequence for a Report Object

You can use an Object trip sequence to specify information about the report database item itself (as opposed to the report’s content). This type of trip sequence can be used to include information on:

To specify the trip sequence for a report Object, you enter the trip code:

%O<field>[.<field>][;<format>]%

where:

the first <field> is one of the following:

If <field> is a reference field or an aggregate field, then you can include further <field>(s) in the trip sequence, in order to specify further database item(s), that are themselves referenced by the database item listed in the preceding <field>.

Use the final <field> in the trip sequence to specify the required Configuration or Data field (OPC property) in the database item or aggregate that is specified in the preceding <field>.

<format> is optionally used to control the appearance of the information that ClearSCADA substitutes in place of the Object’s trip sequence. You only need to specify a format if:

or if:

The custom formats that you can specify for an Object field are the standard custom value formats that are supported by ClearSCADA (see Date and Time Syntax, see Numeric Syntax, see Text String Syntax, and see Boolean Syntax—these are sections in the ClearSCADA Guide to Core Configuration).

You can ascertain the configuration, data, reference, and aggregate fields that you can specify using an Object trip sequence, along with an indication of each field’s type, using either of the following:

  • The database Schema (see Working with ClearSCADA Database Tables)
  • You can also click on the relevant configuration field on a Form and observe its name and type in the Status Bar. (Remember that a field’s name often differs from the label that is shown for that field on the configuration Form. (The label is displayed in the language that is associated with the logged on user’s specified Locale.) It is a field’s name, rather than its label, that has to be specified in any Object trip sequence.) Data fields (and some Configuration fields, such as ParentGroupName) are not displayed on configuration Forms—use the database Schema or OPC Data Bar to ascertain information about such fields.

    Example:

    %OParentGroupId.Name%
    (Provides the name of the Group or Group Instance in which the report is located. For instance, ‘Zone 1’, for a report that is located in the Group ‘Zone 1’.)

    %OParentGroupId.ParentGroupId.FullName%
    (Provides the full name (including the path) of the report’s ‘grandparent’ Group or Group Instance—the Group or Group Instance in which the report’s Group or Group Instance is located. For instance, ‘My Database.Eastern Region’, for a report that is located in the Group ‘Zone 1’, which itself is within the Group ‘Eastern Region’. (With ‘Eastern Region’ being in the Group ‘My Database’.))

    %OParentGroupId.AlarmRedirection.Trigger1%
    (Provides the value of the Trigger1 property. ‘AlarmRedirection’ is the name of the field on the parent Group that links to the Alarm Redirection aggregate. Trigger1 defines the first Trigger State on the Alarm Redirection aggregate. (On the corresponding Form’s Redirection tab, ‘Trigger State’ is the label that identifies the column of trigger state fields—the label is displayed in the language that is associated with the logged on user’s specified Locale.) This trip sequence can only be used if a report’s parent Group has Alarm Redirection enabled.)

    %OExportDestination.TripSequenceTime%
    (Provides the value of the report’s Trip Sequence Time field (for instance ‘NOW’). ‘ExportDestination’ is the name of the field that links the report database item to its Export Destination aggregate. This is the aggregate that contains the Trip Sequence Time field. The example can only be used with a report that is configured with an export destination that includes a trip sequence.)

    %OId;00000%
    (Provides the report’s Id—the number that uniquely identifies the report in the ClearSCADA database. The 00000 formatting is included to force the Id to be displayed as a series of five digits (if the Id is smaller then five digits, it will be preceded by one or more zeros).)

    A more detailed example is given below:

    Example:

    A particular ClearSCADA system is modular. Its database has been configured using a Group Template and a series of Group Instances. A report has been configured within the Group Template—each Instance of the report is used to list each of the items in that particular Group Instance.

    Each Instance of the report is to be exported to a different location—the subdirectory to which each file is to be exported is to have the same name as the Group Instance that is associated with that particular report.

    In the Group Template, the File Name field on the report’s Export Destination tab is used to specify the location to which the report is to be exported.

    The File Name is specified as:

    \\GRBServer\\%OParentGroupId.Name%\%OName% - %DMMM yyyy%.pdf

    This includes two occurrences of an Object trip sequence—one to specify the name of the Group (or Group Instance) in which the report is located, and the other to specify the name that the report item has been given in the ClearSCADA database.

    The File Name also includes a Date trip sequence, %DMMM yyyy%, to specify the month for which each report contains data (see Supported Trip Codes for Dates). As the report for each month is exported at the start of the following month, the Trip Sequence Time is specified as MO-1D (the ‘last day of the previous month’), so that each report’s name correctly identifies the month for which it contains data.

    A Schedule is used to export each report automatically at the start of each month. Within each Group Instance, each report is attached to its Schedule. The Group Instance to which each report’s content is to be restricted is specified as each report is attached to the Schedule (see Guidelines on Configuring Reports within Group Templates for an example that demonstrates this in more detail).

    When each report is exported using the Schedule, it is automatically exported to the subdirectory that has the same name as the Group Instance with which the report is associated. As such, in this example, the Regional Report for ‘Eastern Region’ is exported to the location \\GRBServer\Reports\Eastern Region\, while the Regional Report for ‘Northern Region’ is exported to the location \\GRBServer\Reports\Northern Region\, and so on.

    Further Information

    Use a Schedule to Trigger a Report on a Regular Basis.

    Resolving any Trip Sequence Errors.


    Disclaimer

    ClearSCADA 2017 R3