Filtering Computed Items

In the Query section, you can set a filter on a computed item that resides on the Request Line and invokes an SQL HAVING clause when you process the query.

When you create a computed item, its only reference is through the Request Line. In the same way that you can add an item to Request Line by drag and drop, you can drag and drop a Computed Item onto the Filter Line to prompt for Filter. If the item uses an aggregate function, it displays to the right of all other filters, indicating its use in the HAVING clause of the SQL statement.

  To create and set a filter on a computed item in the Query section

  1. Click an item on the Request line and select Query, then Add Computed Item.

    Computed Item is displayed.

  2. Enter the information in Computed Item and click OK.

    The computed item displays on the Request line under a new name.

  3. If the Filter line is not already displayed, click the Filter button on the Section Titlebar.

  4. Drag the computed item from the Request line and drop it in the Filter line.

    Filter is displayed.

  5. Optional: Enter a descriptive name for the filter in the Name field.

    The name is displayed on the filter line icon and can help differentiate multiple filters set on the same item. The name is also used when scheduling an Interactive Reporting document file.

  6. Select an arithmetic or logical operator from the list to begin defining a filter expression.

  7. Define a pool of potential filter values by entering a filter value in the edit field and clicking the check mark to add each to the values list pane.

    • The Show Values command is not available because Interactive Reporting cannot retrieve a values list for a computed or aggregated request item from the database.

    • Click Custom Values to supply the values in the edit field and click the check mark to add them to the values pane. You can also display values from a custom list previously saved with the Interactive Reporting document file or loaded from a file.

    • If you are familiar with SQL, click Custom SQL and type a SQL Where clause to include in the query statement. You can open the Custom SQL dialog box to check the complete statement logic.

  8. Select the values to include in the filter definition in the values pane.

    Select values individually or click Select all and then deselect those you do not want to include. Only selected items are applied to the filter definition.

  9. When the correct values for the filter expression are highlighted in the values pane, click OK.

    An indicator is added to the Filter line. In the Results section, the filter is applied to the data set immediately. In the Query section, the filter is applied when you process the Query.

    When placing a filter on a Request item computed with a data function in the Query section, a divider is displayed on the Filter line, and the filter icon is placed to the right of the divider. The divider indicates the filter is applied in the SQL Having clause.

  10. Click Process to process the final results set.