problem with parameters | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

problem with parameters

Hi all,
I hope someone can help me.. I can’t seem to get the parameters working at all. I have a dynamic quiery (="select * from employee where job_id=" & Parameters!jobid.Value) in my report, and a parameter jobid.. I link to this report from another one, passing the parameter in the URL, but it displays all rows! I can’t figure out what i am doing wrong.. I changed the query to "select * from employee where job_id=3", and then it displayed just one row (which is correct). Then I changed it back to
(="select * from employee where job_id=" & Parameters!jobid.Value) and it worked correctly if the value of the parameter is 3, but in all other cases it gave me the error that the value of the parameter passed is invalid.. anyone else experienced smth similar? is there something wrong with my configurations? thanks in advance..

A good way to have a Paramterise query is:
SELECT * FROM employees
WHERE job_id = @job_id In this case, report manager automatically creates parameter & displays it in your report. HTH
Harsh
thank you so much! It worked!
]]>