Add a query to a relational report

You can create multiple queries in the Queries view. 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. From the report navigation menu, click Report > Queries.
  2. From the Toolbox tab The toolbox icon, 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, from the All queries menu, click Show data sources to see the queries that use data items from a data source, 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 query object in the Queries view, and then click the Show properties icon Show properties icon.
  4. In the Properties pane, set the query 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.
  5. Double-click a query, and from the Sources 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 The toolbox icon 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.