the SqlDataSource component uses the information provided by the selected .NET data provider about the SQL query and its settings. If the .NET data provider recognizes the declaration as a report parameter, it will be listed in the SqlDataSource.Parameters.
Please test skipping the DECLARE part, and directly use the variables e.g. SQL query like:
--DECLARE @test int
When you are prompted to set values for the listed SQL parameters, add any values, since on executing the query the variables will take other values from the logic of the query.
The other approach is to use a stored procedure.
I hope this information is helpful.
Telerik by Progress
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items