Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Temporary Tables Post Reply Post New Topic
Author Message
reggiejdean
Newbie
Newbie


Joined: 07 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote reggiejdean Replybullet Topic: Temporary Tables
    Posted: 07 Sep 2007 at 9:53am
Hi,
 
I am using Crystal Reports 9.  My plan is to upgrade to 11 soon.  My question is as follows:
 
I need to create and drop two temporary tables using Crystal Reports.  Does CR offer this type of functionality or should I perform this task on the database end and then use CR on the resulting tables?
 
Thanks,
Reggie
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 07 Sep 2007 at 10:30am
I am a not certain that CR XI does exactly what you want.
 
However, you can create Command objects which are essentially SQL statements. I think of them as views rather tables.  However, it does allow you to set relational links between the command objects. I find this extremely useful. You will find this functionality under the Database Expert.
 
The second part of your question is that you should be able to create an actual temporary table on the database server that runs against SQL. 
 
Depending on what you need to do with the table will give the you the answer to the question. If you need to deal with cursors and control methods, then SQL temporary tables are probably the answer. If you just need to pull two sets of data and then relate them to each other give the CR command objects a look.
 
Hope this is of help.
 
Regards,
 
John W.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 07 Sep 2007 at 11:06am
I agree with what John said, but would like to add that you haven't really told us anything about what you want to do. A few more details would make it easy to give a better answer. But yes, John is right.  
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
reggiejdean
Newbie
Newbie


Joined: 07 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote reggiejdean Replybullet Posted: 07 Sep 2007 at 12:02pm

Thank both of you for assisting me with this....

I would like to create two temporary tables and extract data from these with crystal reports.  It would help if I can create these two tables using Crystal Reports....this way I do not have to run scripts via the Oracle interface first, and then you CR on the resulting table.  Here is a high level example of what I need to do:
 
Step 1
Create Temporary Table 1
Update (remove NULLS etc) fields in Temp Table1
Join Parent Table 1 and Parent Table 2 (to create Table 1)
 
Step 2
Create Temporary Table 2
Update fields in Temp Table 2
Join Parent Table 1 and Parent Table 2 (to create Table 2)
 
Step 3
Create reports based on data in Temp Table 1 & 2
 
Step 4
Drop Temp Table 1 & 2
 
I would like to be able to do all of this using Crystal Reports. 
Otherwise, if CR does not allow me to Create and Drop Oracle
database tables, then I will be forced to perform Steps 1, 2, & 4
on the database backend & run Step 3 via CR.
 
Thanks again...you both are very much appreciated.
 
Reggie
 
 
 
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 07 Sep 2007 at 12:23pm
Well, I'm not an Oracle guy so I don't know about its features. But basically, I would just try it. Create a temporary table using the Command object and see if Oracle accepts it. If so, then write the rest the SQL that you need and you'll be okay. Also, I know that the ODBC driver has more functionality than the OLE DB drivers. So if OLE doesn't work for you, then try the ODBC as well to double check. Unfortunately, installing ODBC drivers is a pain so I only use them as a last resort.


Edited by BrianBischof - 07 Sep 2007 at 12:48pm
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
reggiejdean
Newbie
Newbie


Joined: 07 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote reggiejdean Replybullet Posted: 07 Sep 2007 at 12:41pm
Thank you Brian....I cannot wait to buy your next book....coming up soon.
 
Reggie
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 07 Sep 2007 at 12:47pm
I worked really hard on the new book and I hope you like it. However, I don't have anything about Oracle in it. I'm strictly a SQL Server guy. 

Edited by BrianBischof - 07 Sep 2007 at 12:49pm
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
reggiejdean
Newbie
Newbie


Joined: 07 Sep 2007
Location: United States
Online Status: Offline
Posts: 4
Quote reggiejdean Replybullet Posted: 07 Sep 2007 at 2:07pm
Actually my company plans to install a SQL Server 2005 database soon....so I will be discussing your book with you soon. LoL
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 07 Sep 2007 at 3:06pm
Cool! And make sure that everyone in the office gets a copy of the book for reference. 
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
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.031 seconds.