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 ??
Save India From Corruption - Anna Hazare.
Joined: Feb 04, 2011
You can use parameter for this purpose, like for ACTUAL_DATE, following is the syntax.
in sql query you can write, you need to create input control in the jasperserver also while uploading this jrxml.
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: