Author |
Message |
STata
Newbie
Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
|
Topic: Union Clause Posted: 23 Oct 2007 at 1:49pm |
How do I use union clause in Crystal. I know exactly what I want and how to do this using sql but when I go through the Crystal Reports GUI, I cannot figure out how to do a union. I tried editing the SQL from Database, show SQL but it does let me edit it. What am I missing?
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 23 Oct 2007 at 2:32pm |
Yes, CR lets you do UNION (I discuss it in Chapter 11 of my new book). In the Database Expert dialog box, look for Add Command option and click on it to add a new command object. This is where you type in your custom SQL statements with the UNION clause.
|
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
|
IP Logged |
|
STata
Newbie
Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
|
Posted: 24 Oct 2007 at 10:33am |
Thank you, but I don't see the 'Add command option' . When I go to the database expert all I have is 'Data' and 'Link' tabs. I have Crystal Reports X1 installed. Please help.
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 24 Oct 2007 at 10:40am |
That usually happens when you don't have a database that is 100% compatible with CR. Are you using MySql or something? Also, some databases don't have this option when you are connecting with OLE DB, but the ODBC driver will have it. So check to see if you are using ODBC connectivity.
|
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
|
IP Logged |
|
STata
Newbie
Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
|
Posted: 24 Oct 2007 at 10:49am |
I am connecting to an Oracle database on a remote unix server. Is that an issue?
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 25 Oct 2007 at 12:05pm |
I don't know anything about Oracle, but this is most likely the problem. Check for updated ODBC drivers if possible. But you're right - this scenario may not work at all.
|
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
|
IP Logged |
|
JERL
Newbie
Joined: 02 Nov 2007
Online Status: Offline
Posts: 2
|
Posted: 02 Nov 2007 at 7:25am |
I am attempting to use UNION clause in CR too. Have you had any luck since your post on Oct 25th, 2007?
|
IP Logged |
|
STata
Newbie
Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
|
Posted: 02 Nov 2007 at 7:50am |
No, I have not had any luck. To be honest, I have not looked too much into it but I don't see the 'Add Command Option' that Brian mentioned in this thread.
|
IP Logged |
|
JERL
Newbie
Joined: 02 Nov 2007
Online Status: Offline
Posts: 2
|
Posted: 02 Nov 2007 at 7:56am |
I am connecting to oracle as well. If I come up with a solution I'll post it.
|
IP Logged |
|
wattsjr
Groupie
Joined: 25 Jun 2007
Location: United States
Online Status: Offline
Posts: 51
|
Posted: 06 Nov 2007 at 10:39am |
Hi STata,
I may be speaking out of turn here, but I was able to find the "Add Command" that Brian was talking about.
It is under the Data tab, on the left hand side:
+Project Data
....
+History
Expand "History" (click on the "+") and login to your data source name when it prompts you.
When the "History" expands, the first entry under the data source name should be the "Add Command" option.
If you've tried all of this and it still wasn't there, then please 'excuse the ring', I was just hoping that it was something that was hard to find.
Regards,
Edited by wattsjr - 06 Nov 2007 at 10:40am
|
-jrw
|
IP Logged |
|
|