Add a query to a relational report

You can create multiple queries in Query Explorer to suit your particular needs. For example, you can create a separate query for each data container in a report to show different data.

Tip: The Briefing Book sample report in the GO Sales (analysis) package and the Top 10 Retailers for 2011 sample report in the GO Data Warehouse (analysis) package include multiple queries.

Procedure

  1. Click the Queries icon Queries icon, and click Queries.
  2. Click the Toolbox icon The toolbox icon and drag one of the following objects to the work area.

    Object

    Description

    Query

    Adds a query.

    Join

    Adds a join relationship.

    Union

    Adds a union operator.

    Intersect

    Adds an intersect operator.

    Except

    Adds an except (minus) operator.

    SQL

    Adds SQL commands.

    Note: When adding queries to the report
    • right-click the work area and click Show Package Sources to see the queries that use data items from a package
    • right-click the work area and click Expand References to see the relationships that exist between queries in the report, which is useful when you are creating complex queries
  3. Click the Show properties icon Show properties icon, and In the Properties pane, set the object properties.

    For example, if you added a join, set the Join relationships property to define the join.

    Note: The Maximum execution time property for a report query applies only to compatible query mode.
  4. Double-click a query.
  5. Click the Data icon Data icon, and from the Source tab source tab, drag data items to the Data Items pane.
    Tip: You can add data items to the query that you do not want to appear in the layout. For example, to filter on Product line code and show Product line in the layout, you must add both data items to the query.
  6. To create a new data item, click the Toolbox icon The toolbox icon and drag Data Item to the Data Items pane.
  7. To add a filter, click the Toolbox icon, drag Filter to the Detail Filters or Summary Filters pane and define the filter expression.
    Tip: You can also create a filter by clicking the Data icon, dragging a data item from the Source tab to one of the filters panes, and completing the filter expression.