/
How to get SQL Query from Crystal Report

How to get SQL Query from Crystal Report

Description of Issue

How to find the SQL query a Crystal Report is using in the background to use on the SQL Server.

Context
  • EERP(Munis)

  • Crystal Reports

  • SQL Server

  • SSRS Reports

  • Tyler Reporting Services

  • Crystal to SSRS

Cause

Client is looking to find the SQL query a Crystal Report is using to test the query on the SQL Server database, or possibly convert the Crystal Report to an SSRS report. 

Resolution

Once connected to an ODBC connection and datasource in Crystal Reports, you can find the SQL query a report is using in the background:

  1. Click Database in the top ribbon of the Crystal Report. 

  2. Click Show SQL Query...

This opens a window with a SQL query the report is using to generate the data. This can be copied from this window to use in other applications like SQL Server Management Studio and SSRS Report Builder.

Additional Information

The SQL query generated may not include all the filters in Crystal Reports.









Related content

Grant user permission to query tables and legacy views
Grant user permission to query tables and legacy views
More like this
Can reports written in Crystal Reports be migrated to SSRS
Can reports written in Crystal Reports be migrated to SSRS
More like this
How to add custom crystal reports to Munis menu
How to add custom crystal reports to Munis menu
More like this
Create ODBC connection for SaaS clients
Create ODBC connection for SaaS clients
More like this
Master Article - Crystal Reports
Master Article - Crystal Reports
More like this
How to get a list of all Custom SSRS reports
How to get a list of all Custom SSRS reports
More like this