Package ar.com.fdvs.dj.domain

Examples of ar.com.fdvs.dj.domain.DynamicReportOptions


  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());
View Full Code Here


    des.setName(dr.getReportName() != null ? dr.getReportName() : "DynamicReport");
    return des;
  }

  protected static void populateBehavioralOptions(DynamicReport dr, DynamicJasperDesign des) {
    DynamicReportOptions options = dr.getOptions();
    des.setColumnCount(options.getColumnsPerPage().intValue());
    des.setWhenNoDataType(dr.getWhenNoDataType());
    des.setWhenResourceMissingType(dr.getWhenResourceMissing());
    des.setTitleNewPage(options.isTitleNewPage());
    des.setIgnorePagination(options.isIgnorePagination());
    des.getDetail().setSplitAllowed(dr.isAllowDetailSplit());
    des.setSummaryNewPage(options.isSummaryNewPage());
  }
View Full Code Here

   * a template file, we have to populate the "ReportOptions" with the settings from the template file (ie: margins, etc)
   * @param jd
   * @param dr
   */
  protected static void populateReportOptionsFromDesign(DynamicJasperDesign jd, DynamicReport dr) {
    DynamicReportOptions options = dr.getOptions();

    options.setBottomMargin(new Integer(jd.getBottomMargin()));
    options.setTopMargin(new Integer(jd.getTopMargin()));
    options.setLeftMargin(new Integer(jd.getLeftMargin()));
    options.setRightMargin(new Integer(jd.getRightMargin()));

    options.setColumnSpace(new Integer(jd.getColumnSpacing()));
    options.setColumnsPerPage(new Integer(jd.getColumnCount()));

    options.setPage(new Page(jd.getPageHeight(),jd.getPageWidth()));

    if (dr.getQuery() != null){
      JRDesignQuery query = DJJRDesignHelper.getJRDesignQuery(dr);
      jd.setQuery(query);
    }
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.domain.DynamicReportOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.