Manually edit the SQL

Posted on 2004-04-26
Last Modified: 2008-03-17
hi all,

I wonder if it is possible to edit the SQL generated by crystal report 9, I could view the SQL by clicking Database | Show SQL Query, but I cannot edit it. What I want is to edit the whole SQL,
Not just the formula in Record. Is there a way to do it.. ?

Much much thanks
Question by:john_wsm
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 42

Expert Comment

ID: 10920566
No, it is not possible.  Although it was in some previous versions, CR9 removed that possibility completely.

When you use Show SQL Query, you're seeing the SQL created by using the "select records" and other options.  To make a change here, just change the appropriate option.


Author Comment

ID: 10921189
Hi frodoman,

thanks for your help and my problem have been solved partly.

actually my problem is that i have a rpt file (which i have no idea about which version the file is created), and whenever i opened the file and selected Show SQL Query, a reset button is enabled and i have to reset the sql before any change is being made to the file to take effect. so i suspected the rpt file is being made with an older version of CR and my CR 9 forced me to reset the SQL as a result. Do u think so?

So, could u kindly let me know which versions allow the direct editing of SQL and how to edit in that version of CR??

much much thanks

LVL 42

Expert Comment

ID: 10921249
>>> So, could u kindly let me know which versions allow the direct editing of SQL and how to edit in that version of CR??

I believe in version 8.0 you could edit it with the "Show SQL" menu option.  In version 9 (and I believe 8.5 also) this is now a read-only field.

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

LVL 28

Accepted Solution

bdreed35 earned 20 total points
ID: 10922164

It sounds like might have edited the SQL in a past version, and verison 9 doesn't know how to utilize it.

My suggestion to you would be to copy the SQL from the "Show SQL" window, and then create a SQL Command and paste the SQL there.  The report would then use the SQL Command as the datasource and you won't need to bother with the reset anymore.
LVL 42

Expert Comment

ID: 11853214
It's only 20 points, but bdreed simply restated what I'd already written...

LVL 28

Expert Comment

ID: 11853428

You stated it wasn't possible.  My first sentence may have been a recap of what you said, but you never mentioned anything about using a SQL Command as a possible solution to the problem, so I think overall, my post was not a paraphrase of yours.

LVL 42

Expert Comment

ID: 11854751

That's a fair observation - points are yours.



Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question