Have you created the parameters at the right of the command window? If not, that's where you create them. At that point, you will NOT declare them as variable in your SQL. Instead, you'll just position your cursor in the command SQL where you want the parameter to be used and then double-click on the parameter or drag it into the SQL editor portion of the window.
DO NOT create the parameters in the main report - in order to use them in a command, they MUST be created in the command editor.
-Dell