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?
 
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
 
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
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
 
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
 
himabindu_nvnAuthor Commented:
Thank you very much! It worked!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.