Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Can you use cursors etc when using Add Command? Post Reply Post New Topic
Author Message
jrs2345
Newbie
Newbie
Avatar

Joined: 28 Jul 2010
Online Status: Offline
Posts: 2
Quote jrs2345 Replybullet Topic: Can you use cursors etc when using Add Command?
     Posted: 28 Jul 2010 at 9:14am
I am using Crystal XI, connecting using ODBC to Oracle db.
 
I've tried writing cursors, if/then statements, loops in the Add Command section to filter results and process info before bringing data into my Crystal Report but none have worked. They result in syntax errors. I have only successfully used SELECT statements.
 
Can Crystal XI process cursors, declare variables, etc in the Command section? There's too much data to process in Crystal & should be done on the server.
 
Thanks.


Edited by jrs2345 - 28 Jul 2010 at 9:15am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 28 Jul 2010 at 10:40am

I think the problem may be that you're using an ODBC connection which doesn't give you the same capabilities as a Native Oracle connection (which is available in Crystal.)  Also, if you're sending it as an anonymous PL/SQL block, be sure you have your "Delclare", "Begin" and "End" statements.

If that doesn't work, you may have to put your code into a stored procedure that returns a refcursor.
 
-Dell
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