Crystal Reports XI dynamic parameters

Hello All,

I will try to explain this the best tha I can.  I am not accustomed to multiple value parameter passing to stored procedures in Crystal Reports.

1. i currently have a command that executes a stored procedure and prompts the user to enter  three parameter values.  This stored procedure will return one column with x-number of records.

2.  i would like to take those x-number of records and pass the records to another command that will recieve the values as parameters in order to run another stored procedure, in the format of a comma delimited string for example: abc,123,def

EXEC sp_XYZ  {?Param1},{?MultipleCommaSeparatedParameters}

How would i accomplish this taks?


Thanks!
MoreThanDoubledAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
I don't believe you can pass multiple value parameters to a stored procedure.

Since Crystal works on one record at a time, you can't pass the recordset to another stored procedure.

What are you trying to do with the second SP?

mlmcc
0
vastoCommented:
This is known as data driven reports and is not supported by Crystal. In Crystal you can create a command , which will return all the data ( combined result from the first and second command ) and use grouping to present the data. Later you can use bursting , if you want to print the results separately.

There is 3rd party software -R-Tag Manager , which can be used to do exactly what you are trying to do. Check this video for a similar scenario: http://www.r-tag.com/Pages/Preview_CreateBatchJob.aspx
It runs a stored procedure, which returns records and then runs a report using parameters from the returned records.
As far as I know there is a community edition , which is free and can be used for bursting, but I don't know if data driven reports are included with the free license. Sample bursting video is available here : http://www.r-tag.com/Pages/Preview_Bursting.aspx . My guess is that you can use it too.
0
NazermohideeenCommented:
Why would you want Crystal to make the second procedure call. Did you try to call on sql itself. You can create a new procedure that will call both the procedures and return  the final output back to Crystal.
0
James0628Commented:
As I understand it, you want to run one Stored Procedure that produces a single column, take the values from those records and combine them in a comma-separated list, and then pass that list to a second SP.

 I think you could do that using a subreport.  The main report would run the first SP and save the values in a variable.  A subreport in the report footer would run the second SP.  You'd pass the list in the variable from the main report, to the SP parameter in the subreport.  I think that would work.

 But it does seem like you'd be better off doing this on the server, as Nazermohideeen suggested.

 James
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.