Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Accessing Stored Procedure Post Reply Post New Topic
Author Message
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Topic: Accessing Stored Procedure
    Posted: 03 Aug 2009 at 11:03am
I have a report which displays the result set stored in a temp table. For this i need to execute a stored procedure. My question is how would i execute a procedure and then fetch the results from the temp table on to the report. I am new to crystal so not sure how to do. Any help is highly appreciated.
Thanks,
Kiran
share your knowledge
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 03 Aug 2009 at 4:56pm
You can have a report pull data from a stored procedure using the database expert. To pull data from a temp table, in the stored procedure you should have the line SET NOCOUNT ON at the beginning of the stored procedure and at the end you have to pull the data from the temp table (SELECT * FROM @temptable).
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
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 04 Aug 2009 at 7:33am
I didnt understand how it works. how do i run the report from my local machine. i have crystal reports 2008 and the oracle database access. can i get a sample of the code and how do i test it locally. is it some thing that can be test from the application only ?
share your knowledge
IP IP Logged
Allany
Newbie
Newbie


Joined: 03 Aug 2009
Online Status: Offline
Posts: 12
Quote Allany Replybullet Posted: 04 Aug 2009 at 8:43am

So do you call your stored proc manually via a sql client, then run your report after the proc has completed?

Why don't you create a report based on the procedure?  that way when you run the report it calls the procedure and then returns the data from the table after it's completed.

 

IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 04 Aug 2009 at 9:02am

I made sure in the File-->Options tab that the stored procedure is checked. Then I tried to select the stored procedure into the selected tables but it gives an error saying "Invalid Argument Provided". Not sure where i am going wrong. This report was earlier doen in Actuate which worked fine.

share your knowledge
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.