Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.registerDefaults()


      throws ResourceException, ReportProcessingException, IOException, SAXException, ParserConfigurationException
  {
    final URL url = getClass().getResource("Prd-3431.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 MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    XmlTableReportUtil.createFlowXML(report, new NoCloseOutputStream(mbos));
View Full Code Here


      SAXException, ParserConfigurationException, InvalidFormatException
  {
    final URL url = getClass().getResource("Prd-3431.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 MemoryByteArrayOutputStream mbos = new MemoryByteArrayOutputStream();
    ExcelReportUtil.createXLS(report, new NoCloseOutputStream(mbos));
View Full Code Here

      final FontFamily fofam = tfr.getFontFamily(name);
      if ("AmerType Md BT".equals(name))
      {
        final FontSource fr = (FontSource) fofam.getFontRecord(false, false);
        final ResourceManager resourceManager = new ResourceManager();
        resourceManager.registerDefaults();

        final ResourceKey fontSource = resourceManager.createKey(new File(fr.getFontSource()));
        final FontDataInputSource fs =
            new ResourceFontDataInputSource(resourceManager, fontSource);
        final TrueTypeFont ttf = new TrueTypeFont(fs);
View Full Code Here

  public void testPrd3609() throws ResourceException, IOException, ReportProcessingException
  {
    final URL url = getClass().getResource("Prd-3483.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 byte[] bytes = DebugReportRunner.createXmlTablePageable(report);
    System.out.println (new String(bytes, "UTF-8"));
View Full Code Here

  public void testRunSample() throws Exception
  {
    final URL url = getClass().getResource("Prd-2863.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();
    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.xml.Encoding", "UTF-8");
    final ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

    saveReport(report, new File("bin/test-tmp/prd-3319-load-save-disk-1.prpt"));

    // load it to establish the context in all resource-keys ..
    final ResourceManager mgr = new ResourceManager();
    mgr.registerDefaults();
    final Resource resource = mgr.createDirectly(new File("bin/test-tmp/prd-3319-load-save-disk-1.prpt"), MasterReport.class);

    // save it once, that changes the bundle ...
    final MasterReport report2 = (MasterReport) resource.getResource();
    saveReport(report2, new File("bin/test-tmp/prd-3319-load-save-disk-2.prpt"));
View Full Code Here

  private ResourceKey createImageKey()
      throws IOException, ResourceKeyCreationException
  {
    final ResourceManager resMgr = new ResourceManager();
    resMgr.registerDefaults();
    return resMgr.createKey(new URL("http://127.0.0.1:65535/image.jpg"));
  }
}
View Full Code Here

  public void testHeadless() throws Exception
  {
    final URL url = getClass().getResource("Prd-3620-small.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    DebugReportRunner.createXLS(report);
  }
View Full Code Here

      return;
   
    final URL url = getClass().getResource("Prd-3620-small.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 PreviewDialog dialog = new PreviewDialog(report);
    dialog.setModal(true);
View Full Code Here

    basereport.setCompatibilityLevel(null);
    basereport.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "false");

    final URL target = LayoutTest.class.getResource("nested-bands.xml");
    final ResourceManager rm = new ResourceManager();
    rm.registerDefaults();
    final Resource directly = rm.createDirectly(target, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    final LogicalPageBox logicalPageBox = DebugReportRunner.layoutSingleBand
        (basereport, report.getReportHeader(), false, false);
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.