Viewing the SQL code passed by Alchemex to the ODBC Driver for a Report

Did you know you can view the SQL code passed by Alchemex to the ODBC driver in the Administrator? This can be very useful if you are developing a report but keep getting a “Report Execution Error”, you will be able to see exactly what is passed to the ODBC driver, including Table joins, Sort Criteria, Field Expressions, and Filters etc.

How to Switch the Output Mode to SQL View

  1. Open your Report Manager
  2. Right click on Home and select “Switch Output Mode”
3.  Select the Report Data Output mode –  “Screen (SQL Debug)” and click OK
4.  Now highlight the Report that you would like to view in SQL and run as normal
5.  Enter any Parameters the report might have and click OK
6.  The SQL Debug window will pop up with the SQL code that gets passed to the ODBC driver
7.  You can go through the SQL code to try find the problem, then make the relevant changes to the container (Administrator) of the report (Table joins, Field expressions . . .) or to the Report (Report Manager) itself (Filters, Aggregate Functions . . .)

NOTE: You will not be able the edit the SQL code in the Debug mode, you have to correct / make changes to the Container or Report directly.

8.  From the SQL Debug window you can

Test SQL – Test the SQL code to see if it runs out successfully or not

Continue  – To see what the raw data will look like in a Data output window

Things to Keep in Mind

  • When you open the Report Manager it defaults the Output mode to Excel every time, regardless of the state you closed the Report Manager in
  • In a networked environment of Alchemex, the Output mode you select will only be affective on the PC it was set on