-
July 2nd, 2006, 10:28 PM
#1
Can I Edit the SQL Query in Crystal Report 9?
Hi,
Can I Edit the SQL Query in Crystal Report 9?
i just can see the SQL query at "Database"->"Show SQL Query". How do I edit it in Crystal Report?
thank you.
-
July 2nd, 2006, 11:06 PM
#2
Re: Can I Edit the SQL Query in Crystal Report 9?
In "Database"->"Database Expert".
Edit the command directly if you have a command, or a graphically if you have a list of tables and joins.
-
July 3rd, 2006, 12:49 AM
#3
Re: Can I Edit the SQL Query in Crystal Report 9?
In the "Database"->"Database Expert", i only see 2 tabs which are "Data" & "Links" (both are graphical).
i cannot see any "Edit" or the command.
BTW my CR version is 9.2.
-
July 3rd, 2006, 09:37 PM
#4
Re: Can I Edit the SQL Query in Crystal Report 9?
What exactly do you want to edit about the 'query'?
You add/remove tables in the Data tab, and change the joins in the Link tab - i.e. you do it graphically and the SQL query Crystal runs is altered appropriately.
You add data restrictions (where clause) in the Record Selection formula (Report menu, Selection Formulas, Record)
-
July 4th, 2006, 05:11 AM
#5
Re: Can I Edit the SQL Query in Crystal Report 9?
Actually... I want to sort out and display the latest transaction to my report.
eg:
In my table:
Item CustOrder Price
A C1 1.90
A C1 2.10
A C1 2.00
B C8 33.90
B C8 32.00
In my report show:
Item CustOrder Price
A C1 2.00
B C8 32.00
So initially i want to use SQL Statement "Group By" clause to sort it out and display, but later i found it got some problem / the record displayed is not correct.
any idea? or what can i do?
thank you.
-
July 4th, 2006, 06:15 PM
#6
Re: Can I Edit the SQL Query in Crystal Report 9?
Then your SQL is fine; you want to use the Group Expert to group on the column that contains the 'A', 'B' etc. values and then the column for the 'C1', 'C8' etc. values. You might then want to use the Record Sort Expert to order the records within these groups (e.g. is there a timestamp to order them in 1.90, 2.10, 2.00 order?) and display the row you want in the group footer (i.e. suppress the detail).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|