Author |
Topic |
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-10-08 : 14:25:11
|
Is it possible to make a pick list and then use it as the parameter? I'm new to reporting services, so hopefully this might be possible. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-08 : 14:26:19
|
Yes. You need to create another dataset that contains the values for the drop down. Point this dataset at your parameter.Tara |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-10-08 : 15:05:08
|
Thank you for replying. Can you go into more detail? Let me clarify myself here a little bit. I'm trying to create a picklist of menu. So in my report the user can just select one of the item menu and it will trigger that certain query to display information base on that menu. The picklist is not from the database. For example in my picklist I have Customer, Employee, Contact, and Product. If the user selects one of these, it will be use as the parameter for that certain select statements. So let say that if the user wants Employee information, they select the menu Employee and it will display information base on that menu selection. If I'm not making myself clear, please let me know.Thanks. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-08 : 15:10:03
|
Create a new dataset that is:SELECT 'Customer' AS PickListUNION ALLSELECT 'Employee' AS PickListUNION ALLSELECT 'Contact' AS PickListUNION ALLSELECT 'Product' AS PickListGo to Report Parameters in Visual Studio. Select your parameter. In the available values section, select From query, then select your new dataset.Tara |
 |
|
kselvia
Aged Yak Warrior
526 Posts |
Posted - 2004-10-08 : 23:47:09
|
When you create the parameter you can manually enter the list of items instead of retrieving them with a query.--KenI want to die in my sleep like my grandfather, not screaming in terror like his passengers. |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-10-12 : 14:49:17
|
tdugga, That is what I need. Thank you so much. Another question pertaining to this thread. Let say I want to trigger a certain query base on what the user pick from the picklist. How would I go about doing this. Example:SELECT NAME, CITY, STATE, PHONEFROM CUSTOMERWHERE <dataset - (picklist)> = 'Customer'???? Hope you can help me out with this. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-10-12 : 15:05:45
|
I don't understand your query.Tara |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-10-12 : 15:30:34
|
My query is using the 'Customer' from the picklist as parameter. So I want to create a SELECT query that will retrieve that information if the user pick the 'Customer' menu from the picklist. In the Where clause, how do I specify it so that it will use the picklist as the Where Clause. The query in the Where Clause is not right because I don't know how to specify this. LEt me know if this makes sense.Thanks. |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-10-12 : 15:36:43
|
Maybe this will make sense. I use the verify query and it seems to verify that it's working. Not sure if this will return the result I'm looking for. Will neet to test.SELECT NAME, ID, CITY, STATEFROM CUSTOMERWHERE (@picklist = 'Customer') |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-10-12 : 15:51:34
|
It works, but the only problem is how to dynamically change the report layout base on what the user has pick. For example if the user choose 'Customer', it will list the ID, Name, City, and State. But let say that if the user selects the 'Employee', it will list ID, Name, Phone, and Salary. I'm fairly new to Reporting Service and not sure if this is a feature that reporting services can or cannot do. I know that I can use links to jump from one report to the next, but will need to play more with it. Any suggestions? |
 |
|
|