I want to change ORDER BY statement in a jrxml
for example
SELECT * FROM table WHERE Id = 1 ORDER BY Name ASC
How to change ASC dynamic?
I tried below , but it's not work
SELECT * FROM table WHERE Id = $P{Id} ORDER BY Name $P{OrderType}
EXEC sp_executeSQL 'SELECT * FROM table WHERE Id = $P{Id} ORDER BY Name $P{OrderType}'
I have to change it in jrxml, so I cant use code like c# or java.