When running or scheduling a report with parameters via API, you can specify dynamic parameter values by implementing the ParameterGenerator interface. See JReport Javadoc in <install_root>\help\api
for detailed usage of the API.
To set dynamic parameter values to a report:
<install_root>\help\samples\APIParameter
for an example of implementing the ParameterGenerator interface.First disable or delete the line:
props.put(APIConst.TAG_PARAM_PREFIX + "PToday", "2007-5-21");
and then add a line as follows:
props.put(APIConst.TAG_PARAM_PREFIX + "PToday", APIConst.TAG_PARAM_GEN_PREFIX + "MyParameterGeneratorImpl";