How to ... See the SQL inside a Crystal Report Command object

This can be quickly and easily done using the Full Documentation tool.

  1. In the main reports grid, select report(s) for which you wish to perform this query on.
  2. Click on the Full Documentation tool in the tools navigator on the left
  3. When the Full Documentation dialog opens, in the Report Navigation, click on the specific report for which you want to see the tables:
  4. Click on the Database Tables link in the Counts by Object Types In Report section. This will navigate directly to the objects and their properties. Here you’ll see the table name, alias, number of fields, connection string, database type, and fields (including seeing if it’s in use or not). And if the table is built from a command object, you’ll see the actual SQL details here:
  5. Scroll down to the Table that is built from a Command object (hint: it’s Kind property will show Command and the Is Command Table property will be set to true) and look for a property named Command SQL: