The Queries & Reports page provides and displays the user-friendly interface for the creation of a report. As the title of this platform page would suggest, data queries and reports are two sides of the same coin: a data query defines how the system will fetch application data from the database and how it will visualize that data, and a report is the result of executing that query, a page containing the visualized data that is accessible to account users.
These terms are more or less interchangeable, but explicit references to a "data query" typically refer to the configuration of a report as it appears on the Queries & Reports page. The Configure > Queries & Reports link on the main menu redirects the user to this page.
There are four sections on this page, corresponding to the four steps of creating a report.
In the Select section of the Queries & Reports page, each target is listed along with each of its selected fields; the target's code appears in a small, colored box on the left, and each field appears as a box on the right. Each of these boxes can be dragged from the targets section and dropped into the With Criteria, Display As, and Info Panels sections.
If a field is dragged into the With Criteria section, a new criterion with default settings will be created using that field; if it is dragged into the Display As section, it becomes a new table column, data series, etc.; if the user drops a field into the Info Panels section, it becomes a line on an info popup. Dragging the target code box into a section is equivalent to dragging each of that target's fields into the section individually.
Every aspect of a report can be fully constructed through the user interface of the Queries & Reports page. However, an account supervisor can choose to edit a report as XML as well.
The "Edit as XML" button at the bottom of the left filter opens a panel allowing the user to view or edit the XML of a report directly. If the user changes a report using the user interface, he or she must save those changes using the "Update" button on the page, but any changes made to the report directly through XML are saved automatically.
The system saves changes made in XML automatically by referencing the stored version of a report by its code; an unfinished report that a user has not yet added to the system has no stored code, so a user should not attempt to edit a report as XML until the report has been added to the account through the user interface. The "Edit as XML" button also appears to account supervisors on the "View Report" page, allowing him or her to make XML changes to a report and see them immediately reflected on the report page.