} else {
//final JasperPrint jasperPrint = DynamicJasperHelper.generateJasperPrint(getDynamicReport(_invocation), new ClassicLayoutManager(), stackDataSource);
final HashMap parameters = new HashMap();
//TODO set the locale
parameters.put(JRParameter.REPORT_LOCALE, _invocation.getInvocationContext().getLocale());
LayoutManager layoutManagerObj = getLayOutManagerObj(_invocation);
final JasperPrint jasperPrint = DynamicJasperHelper.generateJasperPrint(getDynamicReport(_invocation), layoutManagerObj, ds, parameters);
// Export the print object to the desired output format
writeReponse(request, response, jasperPrint, _invocation);
}