Using Dropdown in reports

I have a table with 3 columns.
1. Product
2. Dollars
3. Pounds

I need to create a report which has 2 dropdowns . 1st dropdown is for products. It should have a list f products.
2nd Dropdown is for currency(Dollars and Pounds).
If some one selects a product from Products dropdown and dollars from currency dropdown, then dollar value for that product has to be returned.

I could successfully create dropdown for products. I am having trouble in creating drpdown for currency. I am not knowing how the dataset should be for the currency dropdown and what parameters have to passed in the main dataset.
himabindu_nvnAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale BurrellDirectorCommented:
Dataset for Currency options:

select 'Dollars' union all select 'Pounds'

in main Dataset

case when @Currency = 'Dollars' then Dollars else Pounds end as Value
0
himabindu_nvnAuthor Commented:
I dont want values of both Dollars and Pounds in Currency dropdown. I want the Currency dropdown to have dollars and Pounds as items(values) in it.

If I write the query with union I get all the values in the two columns but that is not the requirement
0
Dale BurrellDirectorCommented:
I'm don't think I understand you. But I will explain what I meant further.

If you create a report parameter (Currency) which uses the currency dataset as its datasource you will get an dropdownlist input that allows the user to select which currency they want to display.

Then in your main dataset you use the selected current in the case statement I provided originally to show the correct value on the report.
0
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

himabindu_nvnAuthor Commented:
I created a currency parameter with union query. It gives all the values from both the columns. I don't know if I got you correctly.

Let me show you the screen shots. Attached the screen shots. Please let me know if I am right. Thanks! Doc1.docx
0
Dale BurrellDirectorCommented:
I'm sorry I don't have any idea what you mean.

Maybe you could show me a screenshot of the report once you've selected the options and run it.
0
himabindu_nvnAuthor Commented:
Attached the file. In the screenshot , The currency dropdown has a list of values that are in two columns Dollars and Pounds. I want only Dollars and Pounds (only these two values. not the data in both the columns)
Doc1.docx.doc
0
Dale BurrellDirectorCommented:
You're not selecting the current from your table I gave you the complete query i.e.

select 'Dollars' union all select 'Pounds'

don't add 'from' anything.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
himabindu_nvnAuthor Commented:
Thank you very much! It worked!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSRS

From novice to tech pro — start learning today.