public static JasperPrint generateJasperPrint(DynamicReport dr, LayoutManager layoutManager, JRDataSource ds, Map<String, Object> _parameters) throws JRException {
        log.info("generating JasperPrint");
        JasperPrint jp;


        JasperReport jr = DynamicJasperHelper.generateJasperReport(dr, layoutManager, _parameters);
        jp = JasperFillManager.fillReport(jr, _parameters, ds);

        return jp;
    }
public static JasperPrint generateJasperPrint ( DynamicReport dr , LayoutManager layoutManager , JRDataSource ds , Map < String , Object > _parameters ) throws JRException { log . info ( "generating JasperPrint" ) ; JasperPrint jp ; JasperReport jr = DynamicJasperHelper . generateJasperReport ( dr , layoutManager , _parameters ) ; jp = JasperFillManager . fillReport ( jr , _parameters , ds ) ; return jp ; }
Compiles and fills the reports design.

@param dr            the DynamicReport
@param layoutManager the object in charge of doing the layout
@param ds            The datasource
@param _parameters   Map with parameters that the report may need
@return
@throws JRException