Hello guys,
I have to MSSQL databases and I want to use query A or query B to select the good one.
I used a parameter in the query :
Select orderDate, totalSales FROM $P{Database}
And I ran into this error :
the variable of type "@P0" must be declared
Do you have any clue in order to solve this error ?
1 Answer:
Posted on May 11, 2020 at 12:47am
Hello Iggy,
Your query should work if you use $P!{Database}, this syntax is mandatory.
old question : https://community.jaspersoft.com/questions/1115771/how-set-sql-query-dataset-dynamically