Selection Criteria (WHERE Statements)

How to:

You limit the data a user can report from by defining selection criteria, which restrict data to only the records that meet conditions you specify. You use the Expression Builder to define selection criteria.

Selection criteria, for example, filters, limit the amount of data a user can access to build a report. When a user opens a Reporting Object that contains selection criteria, the selection criteria runs and excludes those data values that do not meet the criteria. A filter, on the other hand, runs only when a user selects the filter in Managed Reporting.


Top of page

x
Procedure: How to Create Selection Criteria
  1. Expand the Reporting Object in which you want to add the selection criteria.
  2. In the browser, select the Where folder and, in the Reporting Object window, click Open.

    The Expression Builder dialog box opens.

    In Developer Studio, right-click the Where folder and select Open.

    The Where Assistant dialog box opens.

  3. In Developer Studio, click New to launch the Expression Builder in Developer Studio.
  4. Use the Expression Builder to build the selection criteria.

    For details about building the selection criteria expression, see Using the Expression Builder.

  5. Click OK to save the selection criteria and return to the Reporting Object window.

    If you have finished working with the components of the Reporting Object, remember to click the Done button on the Reporting Object window to save the changes.

    Note: Syntax and error checking are not performed on the commands you enter until the Reporting Object is executed.



Example: Creating Selection Criteria

Your manager wants to allow users to report only on the information relating to your Management Information Systems (MIS) department. To restrict the data, you will create selection criteria, or a WHERE clause, for the object.

Note: For this example, use a Reporting Object that accesses the Employee data source.

  1. Expand the Reporting Object to which you want to add the selection criteria.
  2. In the browser, select the Where folder and, in the Reporting Object window, click Open.

    In Developer Studio, right-click the Where folder and select Open.

  3. In Developer Studio, in the Where Assistant dialog box, click New.

    The Expression Builder dialog box opens.

    1. In the Fields list, select DEPARTMENT.
    2. In the Relations list box, select Is EQUAL to.
    3. In the Value input box, type MIS.

    The Expression Builder should resemble the following image shown to contain DEPARTMENT in the Field text box, Is EQUAL to in the Relations list box, and MIS in the Value text box.

    The Expression Builder image

  4. Click OK to save the selection criteria and return to the Reporting Object window.

WebFOCUS