Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How to Pass A Variable to SQL Soted Procedures Post Reply Post New Topic
Author Message
jdbrau03
Newbie
Newbie


Joined: 04 Jun 2012
Online Status: Offline
Posts: 13
Quote jdbrau03 Replybullet Topic: How to Pass A Variable to SQL Soted Procedures
     Posted: 18 Jun 2012 at 6:35am
I know I have to do a stored procedure to look up values for my report.  I have never done one before and was wondering how to pass a variable value to the stored procedure out of crystal. I have abbreviations in a sting array that i need to pass one at a time to the stored procedure.  I have a for loop set up, just need to know how to pass it to the stored procedure

Thanks

Jeff
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 18 Jun 2012 at 7:31am
Is there a particular reason why the things you need to pass are stored in an array?  What are you trying to accomplish?
 
-Dell
IP IP Logged
jdbrau03
Newbie
Newbie


Joined: 04 Jun 2012
Online Status: Offline
Posts: 13
Quote jdbrau03 Replybullet Posted: 18 Jun 2012 at 7:35am
I pull directions from one table, but they are stored with the abbreviations and the program that we use does a real time conversion to the full text based on said abbreviations.  So when I build and run the report I can only get the abbreviation unless i parse out the abbreviation and pull the full text out of a different data base
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 18 Jun 2012 at 8:04am
Why are you specifically putting the abbreviations into an array?  If you put them into a delimited string of some sort, you can have a stored procedure that returns a cursor in an In/Out parameter that will return the translated values in a format you can join to from the data in your report.
 
-Dell
IP IP Logged
jdbrau03
Newbie
Newbie


Joined: 04 Jun 2012
Online Status: Offline
Posts: 13
Quote jdbrau03 Replybullet Posted: 19 Jun 2012 at 7:46am
That does sound like a better idea.  I have never written a stored procedure before.  I put the values into an array while trying to figure out how to perform the look up of the expanded values.  But my idea did not work
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