Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Report using stored procedure Post Reply Post New Topic
Author Message
yang
Newbie
Newbie


Joined: 13 May 2010
Online Status: Offline
Posts: 7
Quote yang Replybullet Topic: Crystal Report using stored procedure
     Posted: 13 May 2010 at 9:39pm
Hi all,
how to select multiple input values from a stored procedure created from sql server 2005? after created the stored procedure, i would like to implement it in crystal report XI
please advice.
Thank you


Edited by yang - 13 May 2010 at 11:28pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 May 2010 at 3:27am

2 ways: 1) the stored proc is called from an application and the resulting dataset is pushed the report (set the datasource) 2) do exactly as you would for using a table...BUT instead of selecting the Table list, select the 'Stored Procedures' list and select the stored proc you want to use.

 
HTH
IP IP Logged
yang
Newbie
Newbie


Joined: 13 May 2010
Online Status: Offline
Posts: 7
Quote yang Replybullet Posted: 16 May 2010 at 12:06am

Thank you for your reply.

yes, i was able to read from the stored procedure. but how do i actually make the stored procedure to take in multiple input paramater? and when crystal report runs, the user would be able to select from a list of parameter to generate the report?please advise. thank you very much
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 16 May 2010 at 12:40am
Make sure you have Stored Procedure with passing parameters.
 
In CR you can create parameter which have some static value. And these parameters are same format with the one in Stored Procedure (text / integer).
 
 
hope it help.
 
 


Edited by Emir_W - 16 May 2010 at 1:51am
Emir W
IP IP Logged
yang
Newbie
Newbie


Joined: 13 May 2010
Online Status: Offline
Posts: 7
Quote yang Replybullet Posted: 16 May 2010 at 3:01pm
yes. i have stored procedure with passing parameters, but i am unable to browse for parameter and make the stored procedure to take in multiple values from a list in crystal report so as to allow user to choose the values from a list.

Edited by yang - 16 May 2010 at 4:24pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 17 May 2010 at 3:04am

you will have to 'adapt'.  Crystal stores multiple value parameters as an array.  You can't pass an array to a stored proc, so you need to have your users enter a string and have your stored proc utilize the string to get the multiple parameters.

HTH
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