Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.ReportHeader


          reportFooterHandler = new BandTopLevelElementReadHandler(new ReportFooter(), bandtype);
          return reportFooterHandler;
        }
        if ("REPORT_HEADER".equals(bandtype))
        {
          reportHeaderHandler = new BandTopLevelElementReadHandler(new ReportHeader(), bandtype);
          return reportHeaderHandler;
        }
      }

      if ("org.pentaho.reportdesigner.crm.report.model.ReportGroups".equals(type))
View Full Code Here


          reportFooterHandler = new BandTopLevelElementReadHandler(new ReportFooter(), bandtype);
          return reportFooterHandler;
        }
        if ("REPORT_HEADER".equals(bandtype))
        {
          reportHeaderHandler = new BandTopLevelElementReadHandler(new ReportHeader(), bandtype);
          return reportHeaderHandler;
        }
      }

      if ("org.pentaho.reportdesigner.crm.report.model.ReportGroups".equals(type))
View Full Code Here

  public void testSmallPageCount() throws Exception
  {
    final MasterReport report = getReport();
    report.setReportFooter(new ReportFooter());
    report.setReportHeader(new ReportHeader());

    final PrintReportProcessor proc = new PrintReportProcessor(report);
    assertEquals(1, proc.getNumberOfPages());
    proc.close();
  }
View Full Code Here

    pfFact.setBordersMm(paper, 25.5, 25.5, 25.5, 25.5);
    PageFormat pf = pfFact.createPageFormat(paper, PageFormat.LANDSCAPE);
    SimplePageDefinition pageDef = new SimplePageDefinition(pf);
    report.setPageDefinition(pageDef);

    ReportHeader header = new ReportHeader();
    header.setName("Report-Header");
    /**
     * Creates and adds one SubReport for every JTable. Then header
     * (including all SubReports) is added to master report.
     */
    int columnsPerPage = 8;
    for (int i = 0; i < tables.size(); i++)
    {
      final TableModel jtables = (TableModel) tables.get(i);
      header.addSubReport(createSubReport(jtables, i));
      header.getSubReport(i).setQuery("table" + i);
      header.getSubReport(i).getReportHeader().setPagebreakAfterPrint(true);
    }
    report.setReportHeader(header);

    report.setReportFooter(new ReportFooter());
    report.setPageHeader(initPageHeader("Master"));
View Full Code Here

   */
  public static SubReport createSubReport(TableModel tm, int columnsPerPage)
  {
    SubReport report = new SubReport();

    report.setReportHeader(new ReportHeader());
    report.setReportFooter(new ReportFooter());
    report.setPageHeader(initPageHeader("SubReport " + columnsPerPage));
    report.setPageFooter(new PageFooter());

    ItemBand items = report.getItemBand();
View Full Code Here

  protected Element createElement(final String elementType) throws ParseException
  {
    if ("report-header".equals(elementType))
    {
      return new ReportHeader();
    }
    if ("report-footer".equals(elementType))
    {
      return new ReportFooter();
    }
View Full Code Here

    // x=5%, y=55%, width=40%, height=40%
    levelA2.addElement(createBand("A2-B1", Color.red, 0, -50, -50, -50));
    // x=55%, y=5%, width=40%, height=40%
    levelA2.addElement(createBand("A2-B2", Color.darkGray, -55, -5, -40, -40));

    final ReportHeader header = new ReportHeader();
    header.setName("Report-Header");
    header.getStyle().setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(-100));
    header.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(100));
    header.getStyle().setStyleProperty(ElementStyleKeys.MAX_WIDTH, new Float(Short.MAX_VALUE));
    header.getStyle().setStyleProperty(ElementStyleKeys.MAX_HEIGHT, new Float(100));

    header.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.ORANGE);

    header.addElement(levelA1);
    header.addElement(levelA2);

    final ContentFieldElementFactory cfef = new ContentFieldElementFactory();
    cfef.setFieldname("CreateComponent");
    cfef.setMinimumSize(new FloatDimension(400, 400));
    cfef.setAbsolutePosition(new Point2D.Float(0, 0));
View Full Code Here

   */
  public MasterReport createReport() throws ReportDefinitionException
  {

    final MasterReport report = new MasterReport();
    final ReportHeader reportHeader = report.getReportHeader();
    report.setName(getDemoName());

    final TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("T1");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(150, 12));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.RIGHT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("-");
    factory.setFieldname(DemoReportController.MESSAGE_ONE_FIELDNAME);
    factory.setDynamicHeight(Boolean.TRUE);
    reportHeader.addElement(factory.createElement());

    factory.setName("T2");
    factory.setAbsolutePosition(new Point2D.Float(200, 0));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setFieldname(DemoReportController.MESSAGE_TWO_FIELDNAME);
    reportHeader.addElement(factory.createElement());

    final DefaultParameterDefinition paramDef = new DefaultParameterDefinition();
    paramDef.addParameterDefinition(new PlainParameter("Message1", String.class));
    paramDef.addParameterDefinition(new PlainParameter("Message2", String.class));
    report.getParameterValues().put("Message1", inputPanel.getMessageOne());
View Full Code Here

   *
   * @return the report header.
   */
  private ReportHeader createReportHeader()
  {
    final ReportHeader header = new ReportHeader();
    header.setName("Report-Header");
    header.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(48));
    header.getStyle().setStyleProperty(TextStyleKeys.FONT, "Serif");
    header.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(20));
    header.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);

    final LabelElementFactory factory = new LabelElementFactory();
    factory.setName("Report-Header-Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(-100, 24));
    factory.setHorizontalAlignment(ElementAlignment.CENTER);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setText("LIST OF CONTINENTS BY COUNTRY");
    header.addElement(factory.createElement());
    return header;
  }
View Full Code Here

        return footer;
      }

      if (insert instanceof ReportHeader)
      {
        final ReportHeader header = (ReportHeader) insert.derive();
        g.setReportHeader(header);
        return header;
      }

      if (insert instanceof ReportFooter)
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.ReportHeader

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.