Query Definition dialog

You can use the Definition dialog to define a query for Summary Link, Reference Link, Summary Report, and Detail Report. Queries are defined by selecting items to return values for output, and specifying how those values are calculated.

For Summary Report and Detail Report, the dialog contains a second tab, Report Style, where you define the output style of the report.

Filter

In the Filter pane, the required filter items are displayed. These are determined by the DataLink through which Q&A links to the data source. For example, for SunSystems, they are Product, Business Unit and Table. You must specify values for these items, for all query types.

To select a mandatory filter item, right-click the item and select Lookup. From the lookup dialog, select the item and click OK. Your selections populate the Selection List. After specifying the initial mandatory filter items, extra filter items may be displayed, but these depend on the DataLink and on the type of query. You must specify values for these items. You can also add extra filter items by dragging them from the Selection List.

Some items accept multiple values. Hold down the SHIFT key to select contiguous values. Or, hold down the CTRL key to select non-contiguous values.

To specify a period, the Period Selection dialog is displayed.

To specify a filter instead of a value, right-click and select Options.

You can delete items added from the Selection List. Right-click the item and select Delete.

Selection List

The items in the Selection List are populated after you select a table. You must select at least one item from the Selection List for output. Right-click the item and select Add To Output.

You can also use the items in the Selection List as additional filter items, by dragging the item from the Selection List to the Filter section.

Output Field

The Output Field lists items chosen from the Selection List, for which the query will return values.

To change the extraction type, right-click the item and select Extraction Type. Edit the extraction type, and click OK.

To sort the output items, right-click any item and select Sorting, to open the Sort dialog. Make your changes to the sorting order, and click OK.

You can reorder the output items, by dragging them above or below the other items. The order of items in the Output Field specifies the output column sequence. The first item listed is displayed as the first output column, the second item listed is displayed as the second output column, and so on.

Note: The Sorting button is only available for Summary Report and Detail Report queries.

To remove an item from the Output Field, right-click it and select Delete.