code: protected static void populateReportOptionsFromDesign(DynamicJasperDesign jd, DynamicReport dr) {
          DynamicReportOptions options = dr.getOptions();
  
          options.setBottomMargin(jd.getBottomMargin());
          options.setTopMargin(jd.getTopMargin());
          options.setLeftMargin(jd.getLeftMargin());
          options.setRightMargin(jd.getRightMargin());
  
          options.setColumnSpace(jd.getColumnSpacing());
          options.setColumnsPerPage(jd.getColumnCount());
  
          boolean isPortrait = true;
          if (jd.getOrientationValue() == OrientationEnum.LANDSCAPE) {
              isPortrait = false;
          }
          options.setPage(new Page(jd.getPageHeight(), jd.getPageWidth(), isPortrait));
  
          if (dr.getQuery() != null) {
              JRDesignQuery query = DJJRDesignHelper.getJRDesignQuery(dr);
              jd.setQuery(query);
          }
  
          if (dr.getReportName() != null) {
              jd.setName(dr.getReportName());
          }
  
      }
docs: Because all the layout calculations are made from the Domain Model of DynamicJasper, when loading
  a template file, we have to populate the "ReportOptions" with the settings from the template file (ie: margins, etc)
  
  @param jd
  @param dr