Hi everyone. I recently found the ability to define a variable and declare that it may be used as a SQL parameter. My original query looked like this: SELECT * FROM customers. WHERE customerID="@custID"
I also added a parameter named @custID of type int.
I eliminated the parameter and then added a variable named @custID with the checkbox "Allow using as SQL parameter". The report fails to run in the designer and crashes due to the "@" symbol.
How do you utilize a variable in your query?
Question concerning using a variable in a SQL query.
Re: Question concerning using a variable in a SQL query.
In the report data query you still need the sql parameter. You then assign the parameter value in the parameter Expression property to the variable you created.
Re: Question concerning using a variable in a SQL query.
Thanks for your supports, JohnW.