Create Schedule Triggers

A schedule trigger fires when a report job is scheduled to run. Schedule triggers are of type SQL Query.

When a report job is scheduled to run, the schedule trigger executes the SQL statement defined for the trigger. If data is returned, then the report job is submitted. If data isn't returned from the trigger SQL query, the report job is skipped.

The schedule trigger that you associate with a report job can reside in any data model in the catalog. You don't need to create the schedule trigger in the data model of the report for which you want to execute the trigger. You can reuse schedule triggers across multiple report jobs.

  1. In the data model editor task pane, click Event Triggers.
  2. From the Event Triggers pane, click the Create New icon.
  3. Enter the following for the trigger:
    • Name - Enter a name for the trigger.

    • Type - Select Schedule.

    • Language - Accept the default value, SQL Query.

  4. In the lower pane, enter the following:
    • Options - Select this check box to cache the results of the trigger query.

    • Data Source - Select the data source for the trigger query.

    • SQL Query - Enter the query in the text area, or click Query Builder to use the utility to construct the SQL query, see Use the SQL Query Builder.

      You can include parameters in the trigger query. Define the parameter in the same data model as the trigger. Enter parameter values when you schedule the report job.

      The schedule trigger queries don't support multi-select parameters. If your query expects a set of values, modify your query.

    If the SQL query returns any results, the scheduled report job executes. The figure below shows a schedule trigger to test for inventory levels based on a parameter value that can be entered at runtime.