• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 680
  • Last Modified:

pass multiple values for a parameter into a crystal report document that is based off a stored procedure

Hi, I want to pass in multiple values(an array of integers) for a parameter to a crystal report document...

The crystal report document datasource is a stored procedure, the input parameters are from the stored procedure... When I select the parameter name in crystal report to enable multiple values, it is disabled and I cannot set it to true... Is there anything special I need to do with the store procedure to get this to work? How do I pass in multiple values for a parameter in a situation like this?

Thanks
0
shmitnols
Asked:
shmitnols
1 Solution
 
wykabryanCommented:
You are unable to pass multiple values in one parameter from crystal to a stored proc.  It will only pick up the first one.
0
 
shmitnolsAuthor Commented:
how about not using a stored procedure? is it possible to pass in multiple values another way?
0
 
wykabryanCommented:
Yes, if you use a view or table you can pass in multiples values in one parameter very easy.  Just set up the parameter and then in the report>selction formula>records add something like this {column}={?parameter}
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
mlmccCommented:
You should be able to use a stored procedure and use the report select expert to handle the multiple parameter.  Just don't have the parameter in the stored procedure.

mlmcc
0
 
wykabryanCommented:
Right, but that will return all of the data.  From a performance stand point, the data is not filtered on the database side but rather that application/webserver/local pc side.  
0
 
mlmccCommented:
If the filter can be passed to the database Crystal will pass it and the effect will be jkust as if the parameter existed in the stored procedure.

mlmcc
0
 
wykabryanCommented:
Umm.. the understanding that I was given is if it does not show up in the Show sql windows it does not get passed to the database thus filtering happens on the report side.  In some cases, it is no big deal but there are time (tested by me) where I havent passed and it does a "full table scan".  This mean it returns the million records and then filters on it.  What is show in the SQL window is what the database processes.  The best test is to run it on a basic table that has date.  Then try and filter on date using the date funtion as a wrapper.  You will notice that if you take the sql out and run it in toad that it returns a lot more data than in the report.  
0
 
mlmccCommented:
IN the cases when the filter doesn't show in the SQL the filter is using a function that Crystal cannot pass and it must be executed in the report.

mlmcc
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now