Unanswered: modify sql command in report at runtime not in external code
I need to change my sql command depending on a parameter that i receive in my report. i can't change the code section made in java because i have only one which calls all my reports depending on some parameters.
For example. in this sql:
select field1, field2 from mytab where col3 = param1 and col4 = param2
i need to add another and depending on this param. The param is the sql code to add for example the param could be: ' and col5 = 34 '
I will appreciete any help. thank you
I have a variable number of parameters so i can't use something as passing two parameters and make a fork of sql code depending on one of them.