How can i set parameters ${} in jdbc.query in jxls 2.x

687 Views Asked by At

I used to jxls v.1.x. And now i study v.2.x. I want to set parameter from context to sql query

I have in xls-template: jx:each(items="jdbc.query('select * from table1 where field1 < ?',${val1})" var="table1" lastCell="D4")

but it's not working. If i set constant value insted ${val1}, then it's working.

How can i set a paramater value from 'context' to jdbc.query()

1

There are 1 best solutions below

0
On BEST ANSWER

Try this jx:each(items="jdbc.query('select * from table1 where field1 < ?',val1)" var="table1" lastCell="D4")