Examples of MasterReport


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

    mailDefinition.attachmentTypes = (ArrayList) attachmentTypes.clone();
    mailDefinition.attachmentReports = (ArrayList) attachmentReports.clone();
    mailDefinition.attachmentReports.clear();
    for (int i = 0; i < attachmentReports.size(); i++)
    {
      final MasterReport report = (MasterReport) attachmentReports.get(i);
      mailDefinition.attachmentReports.add(report.clone());
    }
    return mailDefinition;
  }

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

    }

    if (progressDialogEnabled)
    {
      progressDialog = new ReportProgressDialog(this);
      final MasterReport reportJob = previewPane.getReportJob();
      if (reportJob == null || reportJob.getTitle() == null)
      {
        progressDialog.setTitle(messages.getString("ProgressDialog.EMPTY_TITLE"));
        progressDialog.setMessage(messages.getString("ProgressDialog.EMPTY_TITLE"));
      }
      else
      {
        progressDialog.setTitle(messages.getString("ProgressDialog.TITLE", reportJob.getTitle()));
        progressDialog.setMessage(messages.getString("ProgressDialog.TITLE", reportJob.getTitle()));
      }
      progressDialog.pack();
    }
    else
    {

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

    if (actionPlugin.isEnabled() == false)
    {
      return;
    }

    final MasterReport reportJob = previewPane.getReportJob();
    if (reportJob == null)
    {
      return;
    }

    try
    {
      actionPlugin.performExport((MasterReport) reportJob.clone());
    }
    catch (CloneNotSupportedException e1)
    {
      ExportAction.logger.error("Internal error: Failed to clone the report."); //$NON-NLS-1$
      previewPane.setStatusType(StatusType.ERROR);

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

        "crew", "trial", "run", "FloatVar", "IntVar", "run", "clock"
    };

    final DefaultTableModel tableModel = new DefaultTableModel(COLNAMES, 8000);

    final MasterReport report = new MasterReport();
    report.setDataFactory(new TableDataFactory
        ("default", tableModel));

    final RelationalGroup group = new RelationalGroup();
    group.setName("Run");
    group.addField("run");

    LabelElementFactory labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(0, 0));
    labelFactory.setMinimumSize(new FloatDimension(160, 12));
    labelFactory.setText("Crew:");
    group.getHeader().addElement(labelFactory.createElement());

    TextFieldElementFactory textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("crew");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(50, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(-100, 12));
    group.getHeader().addElement(textFieldFactory.createElement());

    labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(100, 0));
    labelFactory.setMinimumSize(new FloatDimension(160, 12));
    labelFactory.setText("Trial:");
    group.getHeader().addElement(labelFactory.createElement());

    textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("trial");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(150, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(-100, 12));
    group.getHeader().addElement(textFieldFactory.createElement());

    labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(200, 0));
    labelFactory.setMinimumSize(new FloatDimension(160, 12));
    labelFactory.setText("Run:");
    group.getHeader().addElement(labelFactory.createElement());

    textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("run");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(250, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(-100, 12));
    group.getHeader().addElement(textFieldFactory.createElement());

    group.getFooter().getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(15));

    report.addGroup(group);

    final Band b = new Band();
    b.setName("variables");
    b.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.FALSE);
    b.getStyle().setStyleProperty(TextStyleKeys.FONT, "SansSerif");
    b.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
//    b.setLayoutCacheable(false);

    for (int i = 3, max = tableModel.getColumnCount(); i < max; ++i)
    {
      TextFieldElementFactory tFF = new TextFieldElementFactory();
      tFF.setFieldname(tableModel.getColumnName(i));
      tFF.setAbsolutePosition(new Point2D.Float(200 * (i - 3), 0));
      tFF.setMinimumSize(new FloatDimension(200, 12));
      b.addElement(tFF.createElement());
    }
    report.getItemBand().addElement(b);

    assertTrue(FunctionalityTestLib.execGraphics2D(report));
  }

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

      // subreports have no data-factory at all.
      return;
    }

    // first, try to find a suitable writer implementation.
    final MasterReport report = (MasterReport) getReport();
    final DataFactory dataFactory = report.getDataFactory();

    final DataFactoryWriteHandler handler = DataFactoryWriter.lookupWriteHandler(dataFactory);
    if (handler != null)
    {
      handler.write(getReportWriter(), getXmlWriter(), dataFactory);

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

  {
    // Boot the system

    // Load the report
    final ReportGenerator generator = ReportGenerator.getInstance();
    final MasterReport report = generator.parseReport
        (ObjectUtilities.getResourceRelative("Pre437.xml", Pre437Test.class));
    // Create the report and export to the supplied output filename
    ExcelReportUtil.createXLS(report, new NullOutputStream());
  }

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

*/
public class Prd294Test extends BaseTest
{
  public static void testPrd294()
  {
    MasterReport report = new MasterReport();
    report.setName("RowBandingTest");
    report.getItemBand().addElement(TextFieldElementFactory.createStringElement("tf1",
        new Rectangle2D.Double(20, 0, 100, 18),
        Color.BLACK,
        ElementAlignment.LEFT,
        ElementAlignment.MIDDLE,//change to ElementAlignment.TOP
        new FontDefinition("dialog", 12),
        "-",
        "column"));

    RowBandingFunction switchFunction = new RowBandingFunction();
    switchFunction.setInitialState(true);
    switchFunction.setNumberOfElements(1);
    report.getExpressions().add(switchFunction);

    report.getReportConfiguration().setConfigProperty("org.pentaho.reporting.engine.classic.core.layout.fontrenderer.UseMaxCharBounds", Boolean.TRUE.toString());

    DefaultTableModel tm1 = new DefaultTableModel(new Object[][]{{"1"}, {"2"}, {"3"}, {"4"}, {"5"}, {"6"}, {"7"}, {"8"}, {"9"}}, new Object[]{"column"});

    TableDataFactory dataFactory = new TableDataFactory("default", tm1);
    report.setDataFactory(dataFactory);

    ClassicEngineBoot.getInstance().start();
    assertTrue(FunctionalityTestLib.execGraphics2D(report));
  }

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

   * @throws ReportWriterException if there is a problem writing the report.
   */
  public void write()
      throws IOException, ReportWriterException
  {
    final MasterReport report = (MasterReport) getReport();
    final String reportName = report.getTitle();
    final XmlWriter xmlWriter = getXmlWriter();

    final AttributeList attList = new AttributeList();
    attList.addNamespaceDeclaration("", ExtParserModule.NAMESPACE);
    if (reportName != null)
    {
      attList.setAttribute(ExtParserModule.NAMESPACE, "name", reportName);
    }

    final String query = report.getQuery();
    if (query != null)
    {
      attList.setAttribute(ExtParserModule.NAMESPACE, "query", query);
    }
    attList.setAttribute(ExtParserModule.NAMESPACE,

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

    final URL url = getClass().getResource("prd-2887.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    final EventMonitorFunction eventMonitorFunction = new EventMonitorFunction("Name");
    eventMonitorFunction.setDeepTraversing(true);
    report.addExpression(eventMonitorFunction);

    final PrintReportProcessor prc = new PrintReportProcessor(report);
    final PageDrawable pageDrawable = prc.getPageDrawable(2);
    assertNotNull(pageDrawable);
    final RenderNode[] renderNodes = pageDrawable.getNodesAt(1, 1, null, null);

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

        new Rectangle2D.Float(10, 10, 250, 50),
        null,
        ElementAlignment.CENTER,
        new FontDefinition("Serif", 14),
        test);
    final MasterReport report = new MasterReport();
    report.getReportHeader().addElement(e);
    return report;
  }
TOP
Copyright © 2018 www.massapi.com. 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.