dateformat = dateformat.replaceAll("m", "M");
dateformat = dateformat.replaceAll("Y", "y");
}
JRParameter[] reportParameters = report.getParameters();
ParametersDecoder decoder = new ParametersDecoder();
for (int i = 0; i < reportParameters.length; i++) {
JRParameter parameter = reportParameters[i];
logger.debug("Examining parameter with name [" + parameter.getName() + "] ...");
String paramValueString = null;
if(getEnv().get( parameter.getName() ) instanceof String ){
paramValueString=(String) getEnv().get( parameter.getName() );
}
if (paramValueString == null) {
logger.debug("No value found for parameter with name [" + parameter.getName() + "]");
} else {
logger.debug("Value found for parameter with name [" + parameter.getName() + "] is [" + paramValueString + "]");
/*
* The ParameterConverter converts a single value. Multi-value
* parameters are assumed to contains values that are String type.
* If they are not Strings (list of dates, list of numbers, ...) the
* converter will not work.
*/
if (decoder.isMultiValues(paramValueString)) {
logger.debug("Value found for parameter with name [" + parameter.getName() + "] is [" + paramValueString + "] and it is multivalue. " +
"Cannot adapt parameter nature");
continue;
}
Class aReportParameterClass = parameter.getValueClass();