Sk.Jc
Sk.Jc

Reputation: 151

How to edit an existing query in crystal report

i just can see the SQL query at "Database"->"Show SQL Query". How do I edit it in Crystal Report?

Upvotes: 15

Views: 86676

Answers (6)

ADY
ADY

Reputation: 113

I've recently upgraded to VS 2019 with Crystal Reports for Visual Studio 13 SP25. The right click "Edit Command" option wasn't there for me either but I know it was in the past. However I finally did get it by using a toolbar that was added and a "Select Expert Record" option. The same option should be under the "Report" menu in the full version of Crystal Reports.

Upvotes: 0

Chandani Kothari
Chandani Kothari

Reputation: 1

First Right Click on Database Fields > Set Datasource Location > Select View which you want to replace with another.

Upvotes: 0

thatskj
thatskj

Reputation: 121

  1. Go to Database Fields >> Database Expert
  2. Select all the tables required for the report (Selected Tables section)
  3. Go to the tab: Links
  4. Drag and create all the links required to connect the tables links.
  5. Then you can right click on the link and select Link Options Here you can change your joins and your final SQL query will change accordingly.

Upvotes: 5

CarlGammaSagan
CarlGammaSagan

Reputation: 433

For Crystal Reports 14.1.x, use Report (in menu at the top) ==> Selection Formulas ==> Record

Upvotes: 1

aMazing
aMazing

Reputation: 1460

Firstly I think you need to provide what version of CR you are using.

Secondly, to the best of my knowledge in Version CR13 using VS2010, you CANNOT hand edit SQL query like it we could in older version of CR.

Only way to change it is to update the links/joins on the tables in the Database Expert and Verify Database. These joins will then reflect when you click "Show SQL query".

Thirdly, there is a way you can control the query yourself, using "SQL Command". The steps to do this is mentioned in the other solution.

Upvotes: 0

AHiggins
AHiggins

Reputation: 7219

You are looking for Edit Command within the Database Expert ... see the screenshot below.

enter image description here

Upvotes: 15

Related Questions