?
Solved

Crystal Reports XI dynamic parameters

Posted on 2014-07-23
4
Medium Priority
?
932 Views
Last Modified: 2014-07-24
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!
0
Comment
Question by:MoreThanDoubled
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 40214841
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
 
LVL 18

Expert Comment

by:vasto
ID: 40215052
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
 
LVL 4

Assisted Solution

by:Nazermohideeen
Nazermohideeen earned 600 total points
ID: 40216215
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
 
LVL 35

Accepted Solution

by:
James0628 earned 1400 total points
ID: 40216367
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

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question