Showing results for 
Search instead for 
Did you mean: 

Show SQL Query when no password available

0 Kudos

Using CR(Crystal Reports) in my past, I would swear that I remember opening an RPT file, going to MENU >> Database >> 'Show SQL Query', then when it asks for the password, hitting cancel(or something) and was still able to get to see the actual SQL Code. Am I totally misremembering? Is this not possible? I'm a consultant, working with an SQL dBase for a client. I'm using the SQL Code to get to the different tables that need to be looked at for the project we're working on. I have full admin rights on the server to regenerate the report and make some schema, index, etc. improvements, but I don't have the Software Manufacturer's password. The server has Crystal Viewer on it; so for what little I need the 'Crystal Reports'(writer) App, I'd rather not install it on the server, in case it causes and issues. Besides, when I get done with the 'trial' and it works, I'd want to install it on my local laptop so I can use it with other cliends, no direct connection to the dBase. How can I get the SQL code?

Community Manager
Community Manager
0 Kudos

Hello Jimmi,

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with, as it provides tips for preparing questions that draw responses from our members.

Feel free to take our Q&A tutorial at as well, as that will also help you when preparing questions for the community.

Should you wish, you can revise your question by selecting Actions, then Edit.

Kind regards,


Accepted Solutions (0)

Answers (2)

Answers (2)

Active Contributor
0 Kudos

Hi Jimmi.

Crystal Reports dynamically generates the SQL based on the DB you are connecting to.

ODBC, OLE DB, some PC types and the native Connection will differ depending on the Client used.

If you open the report and use the Set Database Location and expand the connection properties it will show you the connector being used:

You need to have the same Client installed, CR will then show you the SQL as Jamie indicated.

NOTE: using the .NET/JAVA SDK will require a connection based on the same "type" of data source as the original to be able to get the SQL also. Same Client may need to be installed also.


Active Contributor
0 Kudos

hi Jimmi, you can still see the SQL a Save As for your report first (just to be safe) and then go to the Show SQL Query option. You'll be asked to enter any prompts / parameters and then choose any available connection that you have. You'll be prompted to remove tables etc. from the report that aren't available, but choose not to remove them. Afterwards your SQL query should be available.