Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: calling 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: calling stored procedure
     Posted: 05 Oct 2010 at 4:41am
I am using a stored proc to build by report. This proc returns a refcursor. i.e in my proc, i insert the final data into a temp table and use an output cursor to fetch the result set to display it in the report. This report works fine when i run it locally but when i upload this report to CMC and schedule it it duplicates the records. i get twice the number of records. An investigation revealed that the proc is being called twice. is there any other way of calling the proc. Currently i am mapping the proc by connecting to the database which inturn reads all the columns from the temp table to map on the report fields. Is there a way to call stored proc from the command prompt to avoid this duplication.
Thanks,
Kiran
share your knowledge
IP IP Logged
CrystalProgDev
Newbie
Newbie


Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 4
Quote CrystalProgDev Replybullet Posted: 06 Oct 2010 at 12:41pm
have you used Native driver connection or ODBC/OLEDB?
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 07 Oct 2010 at 2:54am
i have used both OLEDB and ORacle connection with no luck. I tested the database and found that the proc is being called twice. not sure where it is being called twice. 
share your knowledge
IP IP Logged
CrystalProgDev
Newbie
Newbie


Joined: 06 Oct 2010
Location: United States
Online Status: Offline
Posts: 4
Quote CrystalProgDev Replybullet Posted: 07 Oct 2010 at 8:51am
send the procedure code. ODBC/OLEDC doesn't support stored procedures with ref cursors. I am not sure how you used the OLEDB... any way send the stored procedure
IP IP Logged
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