Package org.pentaho.reporting.libraries.resourceloader

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


  private void saveReport(final MasterReport report, final File file)
      throws Exception
  {
    BundleWriter.writeReportToZipFile(report, file);
    final ResourceManager resourceManager = report.getResourceManager();
    final Resource bundleResource = resourceManager.createDirectly(file, DocumentBundle.class);
    final DocumentBundle bundle = (DocumentBundle) bundleResource.getResource();
    final ResourceKey bundleKey = bundle.getBundleKey();

    final MemoryDocumentBundle mem = new MemoryDocumentBundle();
    BundleUtilities.copyStickyInto(mem, bundle);
View Full Code Here


  {
    final URL url = getClass().getResource("Prd-3245.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.execGraphics2D(report);

    if (GraphicsEnvironment.isHeadless())
    {
View Full Code Here

  //@Test
  public void testPdf() throws ResourceException, ReportProcessingException, IOException
  {
    URL resource = getClass().getResource("rich-text-sample1.prpt");
    ResourceManager mgr = new ResourceManager();
    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportHeader().getElement(0).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.LTR);
    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
    report.getReportFooter().clear();
View Full Code Here

  {
    final URL url = getClass().getResource("Prd-3245.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.createXmlFlow(report);
  }

  public void testReportStream() throws Exception
View Full Code Here

  @Test
  public void testExcelRendering() throws Exception
  {
    URL resource = getClass().getResource("rich-text-sample1.prpt");
    ResourceManager mgr = new ResourceManager();
    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");
    report.getReportHeader().getElement(0).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.LTR);
    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
View Full Code Here

  @Test
  public void testFastExcelRendering() throws Exception
  {
    URL resource = getClass().getResource("rich-text-sample1.prpt");
    ResourceManager mgr = new ResourceManager();
    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");
    report.getReportHeader().getElement(0).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.LTR);
    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
View Full Code Here

  {
    final URL url = getClass().getResource("Prd-3245.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.createXmlStream(report);
  }

  public void testGoldenSample () throws Exception
View Full Code Here

  @Test
  public void testHtmlRendering() throws Exception
  {
    URL resource = getClass().getResource("rich-text-sample1.prpt");
    ResourceManager mgr = new ResourceManager();
    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");
    report.getReportHeader().getElement(0).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.LTR);
    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
View Full Code Here

  @Test
  public void testFastHtmlRendering() throws Exception
  {
    URL resource = getClass().getResource("rich-text-sample1.prpt");
    ResourceManager mgr = new ResourceManager();
    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportConfiguration().setConfigProperty(ClassicEngineCoreModule.COMPLEX_TEXT_CONFIG_OVERRIDE_KEY, "true");
    report.getReportHeader().getElement(0).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.LTR);
    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    report.getReportHeader().removeElement(0);
    report.getReportHeader().getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.YELLOW);
View Full Code Here

  //@Test
  public void testGraphics() throws ResourceException, ReportProcessingException, IOException
  {
    URL resource = getClass().getResource("rich-text-sample1.prpt");
    ResourceManager mgr = new ResourceManager();
    MasterReport report = (MasterReport) mgr.createDirectly(resource, MasterReport.class).getResource();
    report.getReportHeader().getElement(0).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.LTR);
    report.getReportHeader().getElement(1).getStyle().setStyleProperty(TextStyleKeys.DIRECTION, TextDirection.RTL);
    DebugReportRunner.execGraphics2D(report);

  }
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.