if (id == TEST_FORM) {
return new ReportTestForm();
}
String name = getReportName(formClass, reportType);
if (id >= BASE_REPORT && id < TEST_FORM){
return new JasperFormReporter(formClass, id - BASE_REPORT + 1, name);
}
else if (name != null){
return new JasperFormReporter(formClass, -1, name);
}
if (id == 0){
return new JasperFormReporter(formClass, 0, null);
}
else {
return null;
}
}