Skip to content

Custom Reports and the Query Analyzer

The two ways to turn a SQL query into a report, how they differ, and why a report that goes to users is built in Custom Reports.

PULSE Dashboard can show the result of a SQL query in two ways. A custom report is designed on the Custom Reports screen and released to the users you choose. A Query Analyzer report is added to a tab from the Designer module and runs the query typed into it.

A report that other people will use is built as a custom report. Custom Reports has been the way to write and distribute a report of your own since version 5.68, and Leahy Consulting no longer recommends the Query Analyzer report for that purpose. The Query Analyzer stays in PULSE Dashboard as an administrator's tool: for checking the data behind a figure and for working on a query.

The reason is access. A custom report is granted one report at a time. The Query Analyzer is granted as a whole, so it cannot give one user a query and keep another query from them.

Summary

Custom report Query Analyzer report
Who can use it The users and groups granted that report Every user granted the Query Analyzer report type
What a grant covers One report Every Query Analyzer report, whatever it queries
Where the query is kept Once, in the company database In each copy of the report
A change to the query Reaches every user at the report's next refresh Is made in each copy, or handed out again
A user's layout after a change Kept Reset
Columns The report's own, plus the fields of linked tables through PULSE Dashboard's column chooser The columns the query returns
Filters Tab filters and the Filter Editor apply Tab filters reach the query through a setting or placeholders
Drill-downs Designed on the Drilldown tab Linked detail panels
Graphs Yes No
Who designs it An administrator An administrator

Both belong to the Designer module and both need its license.

Access

A custom report is granted report by report. Release... and User Control... choose the users and groups who can use it, and nobody else finds it under Add New Report. A report of costs and margins can go to the controller alone; a report of open orders can go to the whole sales group. Save, Release and User Control describes both dialogs.

The Query Analyzer is granted as a report type. In User Control a user either has Query Analyzer or does not, and the right covers every Query Analyzer report on every tab. PULSE Dashboard cannot grant one Query Analyzer report and withhold another.

A user who has the right can refresh any Query Analyzer report that reaches them, read its query and copy the query out. A report reaches a user when a colleague shares it through Save and Share, or when a tab that holds it is published to them. The query that was written for the controller then runs for that user as well, with the same rows.

Since version 5.66, changing a Query Analyzer report's query requires Administration Mode. That limits who can write a query. It does not limit who can run one.

We recommend granting the Query Analyzer report type to administrators only. Users and security covers User Control.

Changes to a report

A custom report has one design, kept in the company database. When an administrator saves a change to its query, its columns or its drill-down, the change reaches each user's PULSE Dashboard at the report's next refresh. Nothing is sent out again.

Users keep what they arranged. A user who grouped, sorted or filtered the report still has that arrangement after the change, and the editor tells the administrator before Save when a change takes a column away from users who rely on it. Using a custom report describes what each user sees.

A Query Analyzer report is a separate copy on every tab it was added to, and each copy holds its own query. A change is made in each copy, or made once and handed out again to every user who has the report. Changing the query also resets the grid's layout, so the users lose the columns, grouping and sorting they had arranged.

What a custom report adds

  • Columns from linked tables. On a Dynamic query or an optimized table, users add the fields of linked tables themselves with PULSE Dashboard's column chooser. Data sources and links covers the three data sources.
  • Filters. The PULSE Dashboard filters on a tab apply to the report, and the report's own Filter Editor lists its columns.
  • Drill-downs. A click on a row, a bar or a slice opens the rows behind it, or another report designed for the purpose. See Drill-downs.
  • Graphs. A custom report can be a graph as well as a grid report. See Graphs.
  • Default settings. The administrator sets the layout every user starts with, and a user can go back to it at any time.
  • History. Every saved version is kept, and a report can be rolled back to an earlier one.
  • Other databases and other sites. Sync Databases keeps the company databases of one site the same, and a report travels to another site as a .pulsereport file. See History, sync and export.

Uses of the Query Analyzer

The Query Analyzer remains the right tool for an administrator's own work:

  • Checking a figure. Right-click a report grid and choose View SQL Query... to see the query that ran, then Open in Query Analyzer to run it and change it.
  • Developing a query. Administration → Tools → Query Analyzer ... opens the Advanced Query Analyzer, a full query tool with the Optimized Table Explorer. The editors of a custom report carry the same toolbar, so a query developed there runs unchanged in a custom report.
  • Looking at data once. A Query Analyzer report on an administrator's own PULSE Dashboard answers a question that does not need a report of its own.

Writing your own SQL reports is the full guide to the Query Analyzer, and most of what it says about writing a query applies to a custom report too: the optimized tables, @PULSEUSERDATE and the @@ placeholders work the same way in both.

Moving a Query Analyzer report to Custom Reports

  1. Copy the query out of the Query Analyzer report: open its settings with the Setup icon and copy the text under SQL Query.
  2. Choose Administration → Custom Reports... and click New Grid....
  3. Paste the query into the editor and press Execute (F5). Give the report a Name and choose the module it Appears under.
  4. Arrange the preview as users should first see it, click Set as Default, then Save.
  5. Click Release... and select the users and groups who are to have the report.
  6. Delete the Query Analyzer report from the tabs it was on. Users add the custom report from Add New Report.

A linked detail panel does not carry over. Set up a drill-down on the Drilldown tab in its place.

Building a grid report: Customer Credit goes through the editor step by step.

Need a hand?

The PULSE support team is happy to help: call (513) 723-8095 or email [email protected]. If you have Query Analyzer reports in use today, we can go through them with you and move the ones your users rely on.