Bug in charts using global variables in SQL sentence to filter records

I got a chart that uses a session variable to filter records (by including the corresponding “WHERE <field>=’[myvar]’” in the SELECT statement.

I know the variable got the correct value because I included it in the chart title… but Scriptcase generates ANOTHER sql sentence to retrieve the data (summarizing it according to the dimensions).

This is correct.

The bug is that this generated sentence uses the initial value of [myvar] and NEVER changes. I assigned another value, reload the chart, and the title is correct, but the SQL sentence keeps using the original value in the WHERE statement…
Is like Scriptcase updating the chart Title but not “re-calculating” the SQL string…

I’m using last Scriptcase version 9.0.008, SQL Server 2016. I check the SELECT sentence using SQL Server profiler.

Hello,

Enable debug mode and take two prints. The first running for SQL and application title running and another running only for the title, showing the variable unchanged in SQL, after reloading the chart.