? How to change default checked multivalue parameter from another?

  • I have two parameters, p1 and p2. Both are multivalue, both are driven by separate queries. I know how to populate the actual items using the first parameter, what I need to do is have the items in p2 remain the same, always. That, and, when p1 changes, p2's default selection should change.

    A quick example, if you are lost (I know I am)...

    p1: p2:

    RED BALL

    BLUE CRAYON

    GREEN UMBRELLA

    HAT

    SHOE

    What I want to have happen is this...

    When user picks "RED" from p1, the items that are "RED" in p2 become selected, say the HAT and the BALL. Let's then assume that user is not certain what they want and they choose green instead. p2 then changes which one is selected by default to CRAYON only cause it's the only "GREEN" item in the list.

    This would all take place prior to the report being run. Thanks for any suggestions you may have.

  • i believe you will have one table which include all this detail. When you write dataset of second query (p2) at that time you can say

    select type from tablename where color = @color.

    so when @color needs to be selected first then only second parameter (type) will populate. You need to specify appropriate color and type into table on which you are writing query.

    i hope it helps.

  • Thank you very much for your reply. What you are saying works just fine when I want to reduce the number of items in the list, or restrict them. I also found out that this can work the first time you select an item in the first dropdown list, but it won't work after that. Apparently there is a service pack to fix this. I am not certain about any of this, but I do know that I have found plenty of posts saying that it cannot be done.

    Thanks again.

  • hi,

    well, i have something similar which needs to be done just once. If i select one day then second day shows number of people working into particular department. Then produce report etc.

    It really depends on what you are trying to implement. I thought it was bit similar to my requirement so i gave you solution.

    was it helpful?

    thanks,

    vijay

  • It sounds very similar. I have a list of company groups in the first parameter, in the second is a list of companies.

    It seems that you are trying to limit the choices in the second list, whereas I was trying to leave all the choices, only having different ones appear in the list with checks next to them.

    Were you able to get the second parameter to refresh more than just the first time? That seems to be another problem that I am running into is only being able to make the choices work once.

  • Hi,

    Second parameter depends on the first parameter. so i can select different parameter in second (company) parameter. If i select different first parameter then it will select different second parameter.

    Your example can select company group first then accordingly it will select company name. You can select different company name at any time. Now if you change company group then it will select company name as in your case name depends on group.

    I hope it helps. It is bit confusing to write.

    thanks,

    vijay

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply