Examples of ReportWriter


Examples of org.pentaho.reporting.engine.classic.core.modules.parser.extwriter.ReportWriter

    return writer;
  }

  public void testFactories()
  {
    final ReportWriter writer = createWriter();
    final ClassFactory cc = writer.getClassFactoryCollector();
    assertNotNull(cc.getDescriptionForClass(DataRowDataSource.class));
    assertEquals(cc.getDescriptionForClass
      (DataRowDataSource.class).getObjectClass(), DataRowDataSource.class);
    System.out.println(cc.getDescriptionForClass(DataRowDataSource.class));
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.extwriter.ReportWriter

    System.out.println(cc.getDescriptionForClass(DataRowDataSource.class));
  }

  public void testDataSourceWriter() throws Exception
  {
    final ReportWriter writer = createWriter();
    final StaticDataSource ds = new StaticDataSource(new Line2D.Float());
    final ClassFactory cc = writer.getClassFactoryCollector();
    final Writer w = new OutputStreamWriter(new NullOutputStream(), "UTF-16");
    final XmlWriter xmlWriter = new XmlWriter(w);

    final AttributeList attList = new AttributeList();
    attList.addNamespaceDeclaration("", ExtParserModule.NAMESPACE);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.extwriter.ReportWriter

//    frame.init();
//    frame.pack();
//    RefineryUtilities.centerFrameOnScreen(frame);
//    frame.setVisible(true);
    final MasterReport report = demoHandler.createReport();
    final ReportWriter writer = new ReportWriter(report, "ISO-8859-1",
        ReportWriter.createDefaultConfiguration(report));
    writer.addClassFactoryFactory(new URLClassFactory());
    writer.addClassFactoryFactory(new DefaultClassFactory());
    writer.addClassFactoryFactory(new BandLayoutClassFactory());
    writer.addClassFactoryFactory(new ArrayClassFactory());
    writer.addClassFactoryFactory(new ExtraShapesClassFactory());
    writer.addStyleKeyFactory(new DefaultStyleKeyFactory());
    writer.addStyleKeyFactory(new PageableLayoutStyleKeyFactory());
    writer.addTemplateCollection(new DefaultTemplateCollection());
    writer.addElementFactory(new DefaultElementFactory());
    writer.addDataSourceFactory(new DefaultDataSourceFactory());
    final OutputStreamWriter w = new OutputStreamWriter(System.out);
    writer.write(w);
    w.close();
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.extwriter.ReportWriter

//    frame.init();
//    frame.pack();
//    RefineryUtilities.centerFrameOnScreen(frame);
//    frame.setVisible(true);
    final MasterReport report = demoHandler.createReport();
    final ReportWriter writer = new ReportWriter(report, "ISO-8859-1",
        ReportWriter.createDefaultConfiguration(report));
    writer.addClassFactoryFactory(new URLClassFactory());
    writer.addClassFactoryFactory(new DefaultClassFactory());
    writer.addClassFactoryFactory(new BandLayoutClassFactory());
    writer.addClassFactoryFactory(new ArrayClassFactory());
    writer.addClassFactoryFactory(new ExtraShapesClassFactory());
    writer.addStyleKeyFactory(new DefaultStyleKeyFactory());
    writer.addStyleKeyFactory(new PageableLayoutStyleKeyFactory());
    writer.addTemplateCollection(new DefaultTemplateCollection());
    writer.addElementFactory(new DefaultElementFactory());
    writer.addDataSourceFactory(new DefaultDataSourceFactory());
    final OutputStreamWriter w = new OutputStreamWriter(System.out);
    writer.write(w);
    w.close();
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.extwriter.ReportWriter

    attList.addNamespaceDeclaration("ext", ExtParserModule.NAMESPACE);

    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "legacy", attList, XmlWriterSupport.OPEN);
    writeElementBody(bundle, state, element, xmlWriter);

    final ReportWriter writer = new ReportWriter(state.getMasterReport(), "UTF-8");
    writer.addClassFactoryFactory(new URLClassFactory());
    writer.addClassFactoryFactory(new DefaultClassFactory());
    writer.addClassFactoryFactory(new BandLayoutClassFactory());
    writer.addClassFactoryFactory(new ArrayClassFactory());

    writer.addStyleKeyFactory(new DefaultStyleKeyFactory());
    writer.addStyleKeyFactory(new PageableLayoutStyleKeyFactory());
    writer.addTemplateCollection(new DefaultTemplateCollection());
    writer.addElementFactory(new DefaultElementFactory());
    writer.addDataSourceFactory(new DefaultDataSourceFactory());
    final DataSource datasource = element.getDataSource();

    if (datasource instanceof EmptyDataSource)
    {
      // do nothing ..
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.extwriter.ReportWriter

  }

  private String writeReport(final MasterReport report) throws IOException, ReportWriterException
  {
    final MemoryStringWriter oWriter = new MemoryStringWriter();
    final ReportWriter rc = new ReportWriter
        (report, "UTF-16", ReportWriter.createDefaultConfiguration(report));

    rc.addClassFactoryFactory(new URLClassFactory());
    rc.addClassFactoryFactory(new DefaultClassFactory());
    rc.addClassFactoryFactory(new BandLayoutClassFactory());
    rc.addClassFactoryFactory(new ArrayClassFactory());

    rc.addStyleKeyFactory(new DefaultStyleKeyFactory());
    rc.addStyleKeyFactory(new PageableLayoutStyleKeyFactory());
    rc.addTemplateCollection(new DefaultTemplateCollection());
    rc.addElementFactory(new DefaultElementFactory());
    rc.addDataSourceFactory(new DefaultDataSourceFactory());

    rc.write(oWriter);
    oWriter.close();
    return oWriter.toString();

  }
View Full Code Here
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.