How to enable and disable parameters???

  • Hi Guys,

    I am having 4 parameters (which has drop down values) named Office, Dept, Group, Location.

    Now this is what I want.....

    When I select Location, all the other 3 parameters must be disabled.

    When I select Dept, Group parameter should be enabled.

    When I select Group, Office parameter should be enabled.

    Does anyone have clues how to do this and where to do the necessary changes so that I can enable and disable the parameters accordingly????

    Thanks....

  • Well...the only way I know is to make parameter depending each other...that's the only way to make them disable...

    But I doubt that you can run the report...What about giving a "dummie" value to the others parameters?

  • Hi Guys,

    I am still for any of your suugestions in solving this issue....This is waht I have tried so far :

    I have created a dataset for office named dsoffice and written the below query in it :

    select distinct office_code, office_name from tbl_temp

    where (Group_Name=@Group)

    Now, i have created another dataset for Group named dsGroup and written the below query in it :

    select distinct Group_Name from tbl_temp

    where (Dept_Name=@Dept)

    Now I have created another dataset for Dept named dsDept and written the following query in it:

    select distinct Dept_Name from tbl_temp

    Untill Now, Its working fine....Now when i view the preview tab....first I am able to see the Dept parameter enabled with the other two disabled......when I select value for Dept, Group parameter gets enabled and when I select Group parameter value , the office parameter gets enabled............Its fine till here.....

    Now, Here I am facing the problem....What I eaxctly want is.....When I click on the preview tab....I want my Dept and Location parameter in enabled form and the rest in disabled form (Group and Office parameters gets enabled from the above mentioned method....I got this........)

    Here is what I want..... When I select the value from Location parameter, the Dept parameter should be disabled and

    when I select the value from Dept parameter, the location parameter should be disabled i.e.vice versa......

    Any clues or suggestions of how to this????

    Thanks......

  • Here's what I'd try.

    Set up a first parameter that selects either Dept. or Location. Trigger the Dept. or Location parameters from that.

    HTH

    [font="Comic Sans MS"]toolman[/font]
    [font="Arial Narrow"]Numbers 6:24-26[/font]

  • I agree with Toolmans response. We have a number of suburbs grouped within each postcode and some of our reports (SSRS 2005) are by multi select postcodes and then by multi select suburbs for suburbs within the postcodes selected.

    The parameter selections must be in order ie postcode first, suburb second and all I do is select the suburbs from the full table ( suburb, postcode, state) where the postcode field is in @Postcode. Works well for us

    David

  • Hi Tool Man and David.....

    Thanks for your replies....But I guess you have not seen in my previous post what I have done so far.....Here it is......

    This is what I have tried so far :

    I have created a dataset for office named dsoffice and written the below query in it :

    select distinct office_code, office_name from tbl_temp

    where (Group_Name=@Group)

    Now, i have created another dataset for Group named dsGroup and written the below query in it :

    select distinct Group_Name from tbl_temp

    where (Dept_Name=@Dept)

    Now I have created another dataset for Dept named dsDept and written the following query in it:

    select distinct Dept_Name from tbl_temp

    Untill Now, Its working fine....Now when i view the preview tab....first I am able to see the Dept parameter enabled with the other two disabled......when I select value for Dept, Group parameter gets enabled and when I select Group parameter value , the office parameter gets enabled............Its fine till here.....

    Now, Here I am facing the problem....What I eaxctly want is.....When I click on the preview tab....I want my Dept and Location parameter in enabled form and the rest in disabled form (Group and Office parameters gets enabled from the above mentioned method....I got this........)

    Here is what I want..... When I select the value from Location parameter, the Dept parameter should be disabled and

    when I select the value from Dept parameter, the location parameter should be disabled i.e.vice versa......

    So basically now I just want to know How to disable a run parameter based on the selection of another parameter?????

    Any clues or suggestions of how to this????

    Thanks.....

  • Here is what I want..... When I select the value from Location parameter, the Dept parameter should be disabled and when I select the value from Dept parameter, the location parameter should be disabled i.e.vice versa......

    HMM! I think I would require the user to decide beforehand if they wanted to report by department or location and make this a separate parameter. Dependant on that choice the appropriate parameter would be populated. Both might still appear, but only the relevant one would have any values to select.

    Another option may be to have the data set return values based on the dept/location decision parameter, and then even if a user selects from the other parameter it will not impact the data returned. You could also populate the dept or location parameters with a value eg 'not available' once the first decision has been made.

    David

  • Hi David,

    Thanks again for u r reply.....

    The second option which you have suggestied is...........

    Another option may be to have the data set return values based on the dept/location decision parameter, and then even if a user selects from the other parameter it will not impact the data returned. You could also populate the dept or location parameters with a value eg 'not available' once the first decision has been made.

    Thats what I am not able to understand how to make dept parameter disable whne location parameter is selected or vice versa.....

    or How to populate the dept or location parameters with a value eg 'not available' once the first decision has been made

    Like I am not able to get how to exactly write a query for this one in the dataset???

    Can you provide some hints or a sample query for this type???

    Thanks...

Viewing 8 posts - 1 through 7 (of 7 total)

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