Hi,
I am not sure you can..When the Sql expression is created, there is no value in the parameter for it to use and, anyway, the database is 'unaware' of the CR parameter.
IIRC, Sql expressions are usually limited to what you could use in a direct Sql query against the database.
If you are working in 8.0 or 8.5 (but possibly not higher versions), you could maybe fudge this by creating the SQL expression like this:
(select sum(AKA.`column_value`) from Table1 AKA where
{fn year(AKA.`date`)} = {fn year(Table1.`date`)})
This would create sums by year. You could then use the parameter to limit the year in the record selection formula so only the relevant SQL expression result would be returned.
In 9.0 and above, I think you would have to use the Add Command feature. I believe you have the option of building in parameters (at least in higher versions), but I can't really help you with that.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.