on 09-27-2023 9:07 AM
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?
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.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Jimmi, you can still see the SQL query...do 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.
-jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.