Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 How to enable and disable parameters???

Author  Topic 

raaj
Posting Yak Master

129 Posts

Posted - 2008-08-19 : 20:46:50
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....

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-20 : 01:28:42
make the Dept,Group and Office parameters dependent by passing the parameter values to dataset of next parameter for population.
Go to Top of Page

raaj
Posting Yak Master

129 Posts

Posted - 2008-08-21 : 01:02:44
Hi visakh,
I have done what u said with the dept, group and office parameters....and i think I got the results what i wanted....

But How to disable all the dept parameter when location parameter is selected?????

Thanks....
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-21 : 04:33:23
quote:
Originally posted by raaj

Hi visakh,
I have done what u said with the dept, group and office parameters....and i think I got the results what i wanted....

But How to disable all the dept parameter when location parameter is selected?????

Thanks....


include a new parameter to get value of location parameter value for all others and in dataset return only when its value is null or default value.
Go to Top of Page

raaj
Posting Yak Master

129 Posts

Posted - 2008-08-21 : 20:38:38
Hi Visakh,
This is what i have done 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............

Now I just want to know how to write a query for location in dataset named dslocation...so that when I select the value from location, the remaning parameters (i.e.dept, others are anyways disabled only) gets disabled??????

Thanks,
Raaj...............
Go to Top of Page
   

- Advertisement -