Avatar of netian
netian
 asked on

Can we have dynamic parameters

Hello,
I have a report in which i have a dropdown which contains all the customer names. Is it possible to use another dropdown to control the data for my customer dropdown.

If i can have another dropdown that contains the customer type (Corporate and normal customers)
If i select corporate customer from this dropdown then my second dropdown should display only corporate customers similarly if i select normal customers then it should only display normal customers.

Any help highly appreciated,

Regards,
Mubashir Afroz.
==================
Microsoft SQL Server 2005Microsoft DevelopmentMicrosoft SQL Server

Avatar of undefined
Last Comment
netian

8/22/2022 - Mon
CoyotesIT

Of course you can.

If you have something in the table that differentiates the two types of customers you can populate the second drop down list.

For this since you have two options maybe a radio button list would work but basically you can construct your query to just include the where clause

i.e.

Form
Corporate   Normal

based on the selection
SELECT (LAST_NAME + ', ' + FIRST_NAME) FROM CUSTOMERS WHERE CUSTOMER_TYPE =  ORDER BY LAST_NAME

populate your drop down list with the results and that should take care of it.


~CoyotesIT
netian

ASKER
I cannot use the Forms. As all the reports are being displayed within the default reporting viewer.
So i think it will not be possible to use radio button, because the reporting services only allow textbox,dropdown as parameter input within its viewer.
ASKER CERTIFIED SOLUTION
CoyotesIT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
netian

ASKER
Excellent!.. Thanks..it worked, i really appreciate your timely and accurate response.
Cheers.
Your help has saved me hundreds of hours of internet surfing.
fblack61