Query panel in the Report window
Query panel in the Report window

The Query panel in the report editor window is used to enter a query text in the Transact SQL language. This query gathers the data required to generate reports.

Figure 12.9. Query panel


The Query panel displays the Data sets field, which contains the names of the data sets received from the SQL query. This is a required field.

The names of the data sets are listed with semicolons between them. For each of these data sets, the window displays a separate panel with a data set model.

The panel contains a multiline text field with the text of the query. The context menu of the field contains the following commands:

  • Test query – runs the query.

    Selecting this command opens the Query result window.

  • Cancel – undoes changes made to the query text.

    This command is available if the query text contains unsaved changes.

  • Cut – cuts the selection to the clipboard.

  • Copy – copies the selection to the clipboard.

  • Paste – pastes the selection from the clipboard to the specified location.

  • Delete – deletes the selection.

  • Select all – selects the entire text.

  • Find/Replace... (Ctrl+F) – contextual search and replacement.

    Selecting this command opens the Find/Replace... window.

If the report is created based on another report (i.e. is inherited from an original report), the Data sets field and the query text become read-only.

Figure 12.10. Query panel in the editor window for an inherited report