Solved

Manually edit the SQL

Posted on 2004-04-26
9
437 Views
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
ME
0
Comment
Question by:john_wsm
  • 4
  • 2
9 Comments
 
LVL 42

Expert Comment

by:frodoman
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.

frodoman
0
 

Author Comment

by:john_wsm
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

ME
0
 
LVL 42

Expert Comment

by:frodoman
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.

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 28

Accepted Solution

by:
bdreed35 earned 20 total points
ID: 10922164
ME:

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.
0
 
LVL 42

Expert Comment

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

frodoman
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 11853428
frodoman:

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.

0
 
LVL 42

Expert Comment

by:frodoman
ID: 11854751
bdreed,

That's a fair observation - points are yours.

Cheers,

frodoman
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 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