Query and Report Wizard

The Query and Report wizard runs a selected query script, retains multiple executions in the same window, composes a report from the selected results, and generates an HTML report. Open a stock, user, or project query from the Query menu or Project Tree.

Run a query

On the first page, check one or more sessions in Select Sessions and complete the query-specific parameter form. Enable Include excluded records when records marked excluded in their sessions should also be searched. Select Run query or press F7. A running query can be stopped.

Each execution appears in Query Results. Use the selector in its title bar or Query > Results to switch executions; use the remove button to discard the selected execution. Completed result sets are also attached below their sessions in the selector. Double-click one to open the Result Set Editor.

The toolbar above the query parameters moves through query history and identifies named settings. The Query menu can clear the form, save the current settings as a named history entry or query resource, load stock queries, open another window, and discard results. Completed executions are added to history automatically.

Figure 1. Query and Report Wizard — Query
Query and Report Wizard — Query

Compose the report

After a query completes, select Next to open the Report Composer. The composer is an ordered table of report components. Add stock, user, or project report sections; select a row to configure its settings; and duplicate, rename, remove, drag, or use the arrow buttons to reorder sections.

The save menu writes the report configuration to a project, user library, or chosen file. The folder button opens another configuration. For details about the same composer in its standalone window, see Report Composer.

Generate and export the report

Select Next to run the report graph against the selected query execution. While it runs, the area on the right shows the run status: the step in progress, the query being run with its progress through the selected sessions and a table listing each session queried with its number of results, the number of tables compiled so far, and a Show log button that opens the run log. When the run finishes, the report outline tree on the left lists the report's sections and tables, labelling each table with its row count, for example "Aligned Phones (12,480 rows)", and the area on the right shows whichever item is selected. Selecting a table shows it as a grid. Selecting the top item shows the outline page: section headers, text sections, and one block per table giving its row and column counts alongside Open table, Open in new window, Save as CSV and Save as Excel links. Selecting a section or text item scrolls the outline to it. The outline, with the top item selected, is what appears when the run finishes.

Type in the Filter outline field above the tree to show only the items whose name contains the text, ignoring case. The sections containing a match stay in view, and a section whose own name matches keeps every table inside it. Clear the field to show the whole tree again.

The Log button at the right of the toolbar shows the run log in place of the selected item; select an item in the tree, or the button again, to return.

The full HTML report is never built automatically. Select Generate HTML Report... from the report toolbar or the report tree context menu to build it from the current outline. In the Generate HTML Report dialog, check the sections and tables to include, select Generate HTML, and choose where to save the file. With Open after saving ticked, the saved report also opens in the default web browser. Once a full report has been generated, the top item shows it in place of the outline, and the Report menu offers Save HTML Report..., Print HTML Report... and Open report in browser. Returning to this step later shows the full report again when one was generated for the current run, otherwise the outline.

In the full report, each table has a copy button above it that copies the table to the clipboard as CSV. A table with rows also has a menu button offering Save table as CSV..., Save table as Excel (XLS)... and Open table, which shows the table as a grid.

The Report menu, also available by right-clicking the outline or report page, offers Zoom in, Zoom out and Reset zoom for the page, a Go to submenu that scrolls to a chosen section, and the same table export items as the toolbar. Run again (Shift+F7) clears the results and runs the report again after confirmation.

Large HTML reports

A generated report larger than 5 MB opens as a preview of about its first 5 MB, so the view stays responsive. The preview ends with an End of preview notice, and a bar below the report states how much is shown. Select Open complete report in browser to read the whole report in the default web browser, or Load complete report to load it in Phon. Phon asks for confirmation first: loading a very large report takes time, and Phon may be unresponsive while it loads.

Saving, printing and Open report in browser always use the complete report. A table cut off by the preview is still available in full from the report outline tree.

Export report tables

Use the toolbar's Export tables button or the report tree context menu to save several tables at once. Export tables as Excel workbook... creates a single workbook. Export tables to folder (XLS)... and Export tables to folder (CSV)... write one file per table to a selected folder. In the Export Report Tables dialog, check the tables to export, set the options below, and select Export.

  • Use integers (1/0) for boolean values writes true and false as 1 and 0.
  • Open after export opens the workbook or folder when the export finishes.
  • Create subfolders as shown, offered for folder exports, creates a subfolder for each report section. When it is cleared, every file is written to the selected folder and the section names are joined into each file name.
Figure 2. Export Report Tables
Export Report Tables

View report tables

A selected table is shown as a grid, with Save as CSV... and Save as Excel... buttons for that table at the right of the bar above it, followed by a button that opens the table in a new window. The header row and the row numbers on the left stay in view while scrolling. Click a column header to sort by it. Right-click a column header for the column menu:

  • Filter... narrows the rows by that column's values, and Clear filter removes the condition. A filter icon appears on the header while a filter is active; click it to change the filter.
  • Freeze columns through "..." keeps that column and every column to its left in view while scrolling sideways; a pin appears in the header of each frozen column, and Unfreeze all columns releases them. Phon remembers the column title you chose and freezes through that column in any later table that has it.
  • Hide column "..." removes the column from the grid, from copies, and from the table's Save as CSV and Excel output. Show all columns restores every column, and the Columns submenu ticks individual columns on or off. Hidden columns come back when the table is opened again.
Figure 3. Report table grid
Report step with a table selected in the report outline tree and shown as a grid

The Find field above the grid narrows the view to rows containing the typed text in any visible column, and the status line below it reports how many rows are shown, for example "Showing 40 of 12,480 rows". Tick Wrap text to show long values on up to three lines instead of truncating them; a tooltip on any truncated cell shows its full value.

Select cells and press Cmd+C on macOS or Ctrl+C on Windows to copy them as tab-separated text; selecting every row also copies a header line. Cmd+A or Ctrl+A selects the whole table, and Shift-click extends a selection over any number of rows; press Escape to clear a large selection. Double-click a row to open it in the session editor. Right-click the grid for Copy, Select all, Save table as CSV... and Save table as Excel..., or use the buttons above the grid to save the same table with its visible columns.

An analysis can mark cells for attention, for example the inaccurate productions in the Consistency Analysis. A marked cell has a yellow background in the grid, in the HTML report and in a table saved as Excel. CSV files hold values only.

Click the new window button at the right end of the bar, the table's Open in new window link on the outline page, or right-click a table in the report outline tree and choose Open in new window, to show the table in a window of its own, for example to compare two tables side by side or to keep a table in view while reading the report. The window is titled with the table's place in the outline and has its own sort, filter and column settings. Opening a table that already has a window brings that window to the front. Table windows close when the report window closes or the report is run again.

Figure 4. Report table in its own window
Report table in its own window