Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    61

    Unanswered: URGENT !!! Multiple Values in Parameter

    Scenario:

    The user is allowed to
    select N distinct and discontiguous values from a list of available
    values e.g. from a list of car models
    [ ] Chrysler
    [ ] Dodge
    [ ] Buick
    [ ] Toyota
    [ ] Nissan

    the user can select Buick and Nissan only, then receive a report about
    just the requested models. The difficulty is that the user may choose
    any number of data points, from 0 to the whole list, which doesn't fit
    nicely into the traditional user parameter form that has
    parameter1 = value1
    parameter2 = value2
    parameter3 = value3
    etc.
    and providing a fixed list of parameters will always impact flexibility
    e.g. provide 10 parameters, each one based on the same list, and allow
    the user to select up to 10 separate values - not much good for the user
    who needs data on 11 cars (has to run the report twice and combine the
    results somehow).

    Thus the question about generating an array to hold N values.
    Anyone know how to handle the situation ?

    Thanks in Advance !!

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    How about...
    Chrysler=FALSE
    Dodge=FALSE
    Buick=TRUE
    Toyota=TRUE
    Nissan=FALSE
    etc.?

  3. #3
    Join Date
    Dec 2003
    Posts
    61
    Originally posted by anacedent
    How about...
    Chrysler=FALSE
    Dodge=FALSE
    Buick=TRUE
    Toyota=TRUE
    Nissan=FALSE
    etc.?
    There is only one field which needs to be searched for car models like Chrysler, Nissan ..etc.

  4. #4
    Join Date
    Feb 2004
    Posts
    108
    Can you pass the string ... like :
    'Chrysler', 'Nissan'

    And use this in your dynamic query ?

    Something like :
    WHERE car_name in ( &YourString ) -- YourString = 'Chrysler', 'Nissan'

    Yea, there will be some limitation on length of this string.

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >There is only one field which needs to be searched for car models like
    >Chrysler, Nissan ..etc.
    So what difference does this make on any solution?
    From my perspective some dynamic SQL would be one way to solve this.
    WHERE MODEL = 'NISSAN'
    OR MODEL = 'FORD'
    OR MODEL = 'DODGE'
    To create the SQL you'd use all the name/value pairs set to TRUE.
    How else do you propose to create a single report
    which is based upon 1-n user selections of models?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •