The below is part of my sample MyReport.Jrxml File .
Here as you can see the sql query is static .
How can i make it dynamic , so that i want to pass this value dynamically from my Java Program .
Please guide me .
Please tell me what should be appended inside the queryString Tag so to make it dynamic ??
The only change we need to make on the JRXML template is to remove the <queryString> element.
To fill the report, we need to execute a database query in our Java code, and pass the query results to the report in a datasource, as can be seen in the following example: