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.setColumnCount(options.getColumnsPerPage().intValue());
    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.setWhenNoDataType(dr.getWhenNoDataType());
    des.setWhenResourceMissingType(dr.getWhenResourceMissing());

    des.setTitleNewPage(false);
    des.setSummaryNewPage(false);

    des.setDetail(new JRDesignBand());

    des.getDetail().setSplitAllowed(dr.isAllowDetailSplit());

    des.setPageHeader(new JRDesignBand());
    des.setPageFooter(new JRDesignBand());
    des.setSummary(new JRDesignBand());

    des.setTitleNewPage(options.isTitleNewPage());

    des.setIgnorePagination(options.isIgnorePagination());

    if (dr.getQuery() != null){
      JRDesignQuery query = getJRDesignQuery(dr);
      des.setQuery(query);
    }
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

  }

  protected static DynamicJasperDesign getNewDesign(DynamicReport dr) {
    log.info("obtaining DynamicJasperDesign instance");
    DynamicJasperDesign des = new DynamicJasperDesign();
    DynamicReportOptions options = dr.getOptions();
    Page page = options.getPage();

    des.setColumnCount(options.getColumnsPerPage().intValue());
    des.setPrintOrder(JasperDesign.PRINT_ORDER_VERTICAL);

    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.setWhenNoDataType(dr.getWhenNoDataType());
    des.setWhenResourceMissingType(dr.getWhenResourceMissing());
   
    des.setTitleNewPage(false);
    des.setSummaryNewPage(false);

    des.setDetail(new JRDesignBand());
   
    des.getDetail().setSplitAllowed(dr.isAllowDetailSplit());
   
    des.setPageHeader(new JRDesignBand());
    des.setPageFooter(new JRDesignBand());
    des.setSummary(new JRDesignBand());

    des.setTitleNewPage(options.isTitleNewPage());

    des.setIgnorePagination(options.isIgnorePagination());
   
    if (dr.getQuery() != null){
      JRDesignQuery query = getJRDesignQuery(dr);
      des.setQuery(query);
    }
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 = getJRDesignQuery(dr);
      jd.setQuery(query);
    }
View Full Code Here

    expression.setValueClass(Boolean.class);
    expression.setText(EXPRESSION_TRUE_WHEN_ODD);

    JRDesignRectangle rectangle = new JRDesignRectangle();
    rectangle.setPrintWhenExpression(expression);
    DynamicReportOptions options = getReport().getOptions();
    rectangle.setHeight(options.getDetailHeight().intValue());
    rectangle.setWidth(options.getColumnWidth());
    rectangle.setStretchType(JRDesignRectangle.STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT);
    Style oddRowBackgroundStyle = options.getOddRowBackgroundStyle();

    addStyleToDesign(oddRowBackgroundStyle);//register this style in the jasperDesign

    JRDesignStyle style = oddRowBackgroundStyle.transform();
    style.setForecolor(oddRowBackgroundStyle.getBackgroundColor());
View Full Code Here

  }

  protected static DynamicJasperDesign getNewDesign(DynamicReport dr) {
    log.info("obtaining DynamicJasperDesign instance");
    DynamicJasperDesign des = new DynamicJasperDesign();
    DynamicReportOptions options = dr.getOptions();
    Page page = options.getPage();

    des.setColumnCount(options.getColumnsPerPage().intValue());
    des.setPrintOrder(JasperDesign.PRINT_ORDER_VERTICAL);

    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.setWhenNoDataType(dr.getWhenNoDataType());
    des.setWhenResourceMissingType(dr.getWhenResourceMissing());
   
    des.setTitleNewPage(false);
    des.setSummaryNewPage(false);

    des.setDetail(new JRDesignBand());
    des.setPageHeader(new JRDesignBand());
    des.setPageFooter(new JRDesignBand());
    des.setSummary(new JRDesignBand());

    des.setTitleNewPage(options.isTitleNewPage());

    des.setIgnorePagination(options.isIgnorePagination());
   
    if (dr.getQuery() != null){
      JRDesignQuery query = getJRDesignQuery(dr);
      des.setQuery(query);
    }
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 = getJRDesignQuery(dr);
      jd.setQuery(query);
    }
View Full Code Here

    expression.setValueClass(Boolean.class);
    expression.setText(EXPRESSION_TRUE_WHEN_ODD);

    JRDesignRectangle rectangle = new JRDesignRectangle();
    rectangle.setPrintWhenExpression(expression);
    DynamicReportOptions options = getReport().getOptions();
    rectangle.setHeight(options.getDetailHeight().intValue());
    rectangle.setWidth(options.getColumnWidth());
    rectangle.setStretchType(JRDesignRectangle.STRETCH_TYPE_RELATIVE_TO_TALLEST_OBJECT);
    Style oddRowBackgroundStyle = options.getOddRowBackgroundStyle();

    addStyleToDesign(oddRowBackgroundStyle);//register this style in the jasperDesign

    JRDesignStyle style = oddRowBackgroundStyle.transform();
    style.setForecolor(oddRowBackgroundStyle.getBackgroundColor());
View Full Code Here

  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.setColumnCount(options.getColumnsPerPage().intValue());
    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.setWhenNoDataType(dr.getWhenNoDataType());
    des.setWhenResourceMissingType(dr.getWhenResourceMissing());

    des.setTitleNewPage(false);
    des.setSummaryNewPage(false);

    des.setDetail(new JRDesignBand());

    des.getDetail().setSplitAllowed(dr.isAllowDetailSplit());

    des.setPageHeader(new JRDesignBand());
    des.setPageFooter(new JRDesignBand());
    des.setSummary(new JRDesignBand());

    des.setTitleNewPage(options.isTitleNewPage());

    des.setIgnorePagination(options.isIgnorePagination());

    if (dr.getQuery() != null){
      JRDesignQuery query = getJRDesignQuery(dr);
      des.setQuery(query);
    }
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.