code: public static ReportLayout getDynamicReportLayout(Connection con, ReportLayout layout, ParametersBean pBean) throws Exception {		
          ReportLayout convertedLayout = ReportUtil.getReportLayoutForHeaderFunctions(layout);
          // IMPORTANT: must take for report layout at the end because we save some transient data 
          // (see getForReportLayout: newReport.getGeneratedParamValues().put(columnName, in.getId());
          ReportLayout forConvertedLayout = ReportUtil.getForReportLayout(con, convertedLayout, pBean);
          return forConvertedLayout;
  	}
docs: Get dynamic report layout
  Report layout is dynamically modified in some situations like:
  1. FOR Report Band Element
  2. Functions in Header or Group Header
  
  @param con database connection
  @param layout report layout
  @param pBean parameters bean
  
  @return dynamic report layout
  @throws Exception