Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Union Clause Post Reply Post New Topic
Page  of 2 Next >>
Author Message
STata
Newbie
Newbie


Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
Quote STata Replybullet 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? Cry
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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 IP Logged
STata
Newbie
Newbie


Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
Quote STata Replybullet 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 IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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 IP Logged
STata
Newbie
Newbie


Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
Quote STata Replybullet Posted: 24 Oct 2007 at 10:49am
I am connecting to an Oracle database on a remote unix server. Is that an issue?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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 IP Logged
JERL
Newbie
Newbie


Joined: 02 Nov 2007
Online Status: Offline
Posts: 2
Quote JERL Replybullet 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 IP Logged
STata
Newbie
Newbie


Joined: 25 Sep 2007
Location: United States
Online Status: Offline
Posts: 8
Quote STata Replybullet 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 IP Logged
JERL
Newbie
Newbie


Joined: 02 Nov 2007
Online Status: Offline
Posts: 2
Quote JERL Replybullet 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 IP Logged
wattsjr
Groupie
Groupie
Avatar

Joined: 25 Jun 2007
Location: United States
Online Status: Offline
Posts: 51
Quote wattsjr Replybullet 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 IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.000 seconds.