I fixed the bug. Here is the solution:
modify org.outerj.xreporter.report.instance.Parameter
public void submit(Map submitValues, ExecutionContext executionContext, boolean rawLocale)
{
String value = (String)submitValues.get(getName());
if (value != null && !value.equals(""))
{
enteredValue = value;
ValidationResult validationResult = definition.getDataType().validate(value, executionContext, rawLocale);
if (validationResult.isValid())
{
this.validationErrorMsg = null;
this.value = validationResult.getValue();
}
else
{
this.validationErrorMsg = validationResult.getErrorMsg();
this.value = null;
}
}
else if (definition.isRequired())
{
this.value = null;
enteredValue = "";
validationErrorMsg =
executionContext.getResourceHandle().getBundle("org/outerj/xreporter/report/ReportMessages").getString("required-value");
}
//XREPORTER
XRP-8 BUG FIX
else if(!definition.isRequired() && (value==null || value.equals(""))){
this.validationErrorMsg = null;
this.value=null;
}
//END
XRP-8 BUG FIX