SaveResults with parameters in file name is not working in 13.0.4
It was working in ADS 9.0.16 and ADS 10.0.8.
Stopped working since ADS 11.0.15
To reproduce, in the BI database, execute a query to superstore
1. Enable Parametrized scripts
2. Enter a query as below and in the parameters window, enter Central.
3. Expected result is to save a file name with parameter Central.xls, but instead &Region.xls is getting saved
select * from superstore
where Region='\&Region'
go
.saveResults 'Format=Excel,
Source=Grid,
File="/Users/tariq/Desktop/&Region.xls",
Overwrite=true,
IncludeChart=false,
IncludeHeader=true,
IncludeNullText=false,
IncludeRowCount=false,
IncludeSQL=false,
AlternateRow=false,
AlternateRowBackground=#e8e8ff,
AlternateRowForeground=#000000'
I spoke with Niels and he says we made changes to the Parser and this script will work if the user escapes the variable within quotes. For e.g, user needs to use \ before the &Discount.
File="/Users/tariq/Desktop/BalanceSheetBoardSummary\&Discount\&Unit.xls"
Now I tested this condition and this works fine if the file has one variable.
But if the filename has 2 variables, this does not work. The file name is stored with the first variable only.
See attached pics
Replacing multiple parameters in a quoted string was never implemented. Please test all aspects of parameterized script for regression.
Replacing multiple parameters in a quoted string was never implemented. Please test all aspects of parameterized script for regression.
Issue #11675 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 14.0.8-7 |
No time estimate |
I spoke with Niels and he says we made changes to the Parser and this script will work if the user escapes the variable within quotes. For e.g, user needs to use \ before the &Discount.
File="/Users/tariq/Desktop/BalanceSheetBoardSummary\&Discount\&Unit.xls"
Now I tested this condition and this works fine if the file has one variable.
But if the filename has 2 variables, this does not work. The file name is stored with the first variable only.
See attached pics