Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple multi value parameters

Status
Not open for further replies.

hpl2001

Programmer
Dec 18, 2001
105
0
0
CA
Hello.

I'm wondering if I use 2 multi value parameters in my report of the entries from both parameters will match up. Ie, the report uses the first entry of multi A and the first entry of multiB, then it processes the second entry of multiA along with the second entry of MultiB, etc.

TIA

Holly
 
Hi Holly

I'm sorry but I don't understand wat you are asking. Are you able to explain in more detail exactly what you are trying to achieve please. Sample data and parameters will probably help.

Cheers
Pete
 
Multi-value parameters are useful for IN clauses. Something like "Product in ('x0', 'x1', ...)". You probably can treat them as arrays and do filtering like
(Product[0]='x0' AND Factory[0]='y0')
OR
(Product[1]='x1' AND Factory[1]='y1')
However, this will be a mess and I am not sure how you can enforce parameter values to always be provided in the right order.

If you need sets of parameters check if data-driven subscriptions will serve you better. The concept is taken from SSRS but you can implement it with Crystal reports too. In general, you run a custom query , which will return some records and you can use the values from each record to run a report. You will run the report once per each record and your parameters don't need to be multivalued. For the sample above you will have rows like these
Product Factory
x0 y0
x1 y1

and you will run your report twice.


Viewer and Scheduler for Crystal reports, SSRS and Dynamic Dashboards.
 
Hi,

The OP is posing a problem where Parameter1 value[sub]a[/sub] means that Parameter2 values list will not be congruent with Parameter1 value[sub]b[/sub] Parameter2 values list.

That is, in order to get a list of Parameter2 values to select from, a Parameter1 value must be selected which will dictate the Parameter2 value list or visa versa.

I solve this problem by running my queries from Excel, where I can run a query to generate a list based on a previously selected parameter. As I recall, I once ran a query that had 5 parameters, that required 4 supporting queries for parameter lists, prior to running the query in question.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
It still isn't entirely clear - is Cascading Parameters what you are looking for? That is where the pick list for the 2nd parameter is based on the selection of the 1st parameter.

This is functionality that was introduced in later versions of Crystal.

Probably not helpful but in the absence if further detail from OP I've got nothing else to offer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top