I work with rdl report in Visual studio 2010.
I write Query and Refresh field then it prompt " Define Parameter for Query "
like this
Parameter Name | Parameter Value
and I set this value
@proj | Parameters!project.Value
then click OK
I get this Error
Incorrect Syntax near '!'
I don't know whrere '!' in my Query
This is example my Query in rdl dataset
DECLARE @sqlCom NVARCHAR(MAX)
SET @sqlCom = '
SELECT name
FROM customer
WHERE id IN ('+ @proj +')
'
IF (LEN(@phoneNo) > 0)
BEGIN
SET @sqlCom = @sqlCom + ' AND phoneNo LIKE ''%'+@phoneNo+'%'' '
END
IF (LEN(@age) > 0)
BEGIN
SET @sqlCom = @sqlCom + ' AND age LIKE ''%'+@age+'%'' '
END
EXECUTE(@sqlCom)
So. Only @sqlCom is SQL variable @proj , @phoneNo , @age is rdl Parameters
anyone help me how to fix this problem
Thank you.