@SuppressWarnings("unchecked")
    protected static void visitSubreports(DynamicReport dr, Map _parameters) {
        for (DJGroup group : dr.getColumnsGroups()) {
            //Header Subreports
            for (Subreport subreport : group.getHeaderSubreports()) {
                if (subreport.getDynamicReport() != null) {
                    visitSubreport(dr, subreport);
                    visitSubreports(subreport.getDynamicReport(), _parameters);
                }
            }

            //Footer Subreports
            for (Subreport subreport : group.getFooterSubreports()) {
                if (subreport.getDynamicReport() != null) {
                    visitSubreport(dr, subreport);
                    visitSubreports(subreport.getDynamicReport(), _parameters);
                }
            }
        }

    }
@ SuppressWarnings ( "unchecked" ) protected static void visitSubreports ( DynamicReport dr , Map _parameters ) { for ( DJGroup group : dr . getColumnsGroups ( ) ) { for ( Subreport subreport : group . getHeaderSubreports ( ) ) { if ( subreport . getDynamicReport ( ) != null ) { visitSubreport ( dr , subreport ) ; visitSubreports ( subreport . getDynamicReport ( ) , _parameters ) ; } } for ( Subreport subreport : group . getFooterSubreports ( ) ) { if ( subreport . getDynamicReport ( ) != null ) { visitSubreport ( dr , subreport ) ; visitSubreports ( subreport . getDynamicReport ( ) , _parameters ) ; } } } }
Performs any needed operation on subreports after they are built like ensuring proper subreport with
if "fitToParentPrintableArea" flag is set to true

@param dr
@param _parameters
@throws JRException