Symptoms
When you try to use a function to specify a report parameter value on the Report Commander command line, Report Commander fails with an "Invalid response file" error.
For example, you use the following command line syntax to set two parameters for your reoprt:
-parameters @now("yyyy-MM-dd",-1,day) @now("yyyy-MM-dd")
Report Commander fails with the following error:
Cause
This occurs because Report Commander interprets command-line options that start with "@" as being response file names.
Resolution
To avoid this problem escape the "@" sign with a backslash ("\") when the "@" appears at the beginning of a parameter value:
-parameters @now("yyyy-MM-dd",-1,day) @now("yyyy-MM-dd")
Only escape the "@" when it occurs at the beginning of the value. If you have nested functions, do not escape them:
-parameters "\@FormatDate(@DateAdd(@StartOfMonth(),-2,"month"),"yyyy-MM-dd")" "\@FormatDate(@EndOfMonth(),"yyyy-MM-dd")"