private static final Log log = LogFactory.getLog(DJJRDesignHelper.class);
public static DynamicJasperDesign getNewDesign(DynamicReport dr) {
log.info("obtaining DynamicJasperDesign instance");
DynamicJasperDesign des = new DynamicJasperDesign();
DynamicReportOptions options = dr.getOptions();
Page page = options.getPage();
des.setPrintOrder(JasperDesign.PRINT_ORDER_VERTICAL);
byte orientation = page.isOrientationPortrait() ? JasperReport.ORIENTATION_PORTRAIT : JasperReport.ORIENTATION_LANDSCAPE;
des.setOrientation(orientation);
des.setPageWidth(page.getWidth());
des.setPageHeight(page.getHeight());
des.setColumnWidth(options.getColumnWidth());
des.setColumnSpacing(options.getColumnSpace().intValue());
des.setLeftMargin(options.getLeftMargin().intValue());
des.setRightMargin(options.getRightMargin().intValue());
des.setTopMargin(options.getTopMargin().intValue());
des.setBottomMargin(options.getBottomMargin().intValue());
des.setDetail(new JRDesignBand());