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.
Author |
Topic |
1sabine8
Posting Yak Master
130 Posts |
Posted - 2007-11-05 : 02:49:15
|
In have a report parameter "Restaurants" which i got from a query. I have another query where i need to select rows where restaurant name = the restaurant chosen from the report parameter. if i put where restName=@Restaurants i get a new parameter. Can anyone tell me the right syntax to have access to a parameter already created as a report parameter? |
|
Scott.Thornburg
Starting Member
10 Posts |
Posted - 2007-11-05 : 20:43:59
|
SSRS will create a report parameter from a query variable (@myVariable) when that variable is first used. Typically, if the identical variable (case-sensitive) is used in a second query, the new variable will be mapped automatically to the original report parameter.It doesn't sound like this occurred in your case however. To clean up the mapping:1) In the data tab, edit the dataset ("..." button). Click on the parameters tab and map your query variable to the correct parameter name.2) Then delete the unwanted report parameter from the menu: Report -> Report Parameters. Select the parameter to delete from the left panel and click "Remove" at the bottom.That should do it.Scott Thornburg |
|
|
|
|
|